Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

securityDefinitions 增加header属性不生效 #177

Open
MuYi086 opened this issue Sep 7, 2023 · 1 comment
Open

securityDefinitions 增加header属性不生效 #177

MuYi086 opened this issue Sep 7, 2023 · 1 comment

Comments

@MuYi086
Copy link

MuYi086 commented Sep 7, 2023

1
new实例的时候添加的Authorization和content-type项
2
在网页上填入了具体信息
3
接口查询还是报401未授权
后端接口没问题,以上token和content-type设置在postman跑过,是可以查询到数据的,但是在网页swagger-ui报401,如何处理?

@MuYi086
Copy link
Author

MuYi086 commented Sep 7, 2023

问题已经解决了,发现删除自定义配置的swaggerOptions,这样new SwaggerRouter() 生成的实例,在网页上添加授权信息,相关接口是可以查询数据的,不会报401了。估计是还不支持自定义配置swaggerOptions的功能吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant