Open runlong-yao opened 1 year ago
Okay, It might be an issue with Content-Security-Policy. This worked for me:
api.use(
'/swagger',
(req: Request, res: Response, next: NextFunction) => {
res.setHeader('Content-Security-Policy', `script-src 'self'`);
next();
},
swagger.serve,
swagger.setup(docs, opts),
);
It looks like #212 I face the problem with swagger-ui-express@4.6.3
I try: 1、remove helmet, but not working. 2、use swagger-ui-express@4.1.3 , working.