scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.42k stars 225 forks source link

insecure question #240

Closed nicetomeetnode closed 2 years ago

nicetomeetnode commented 3 years ago

hello,when i use swagger-ui-express in nestjs,i couldn't find how to set username and passwd to protect apis info,and everyone can read my apis info with swagger,it is insecure ,how to set username and passwd in my project to avoid it ,please find me a solution ,thanks very much

scottie1984 commented 2 years ago

This would be outside the scope of this module. You should be able to protect the endpoints using some express middleware setup