*Fist of all, sorry by my bad english (i am not a native speaker). *
I need do documentate a web api. By this, i am using Swagger. To protect the doc, i am using RoutePrefix, only authorized persons can access, only who knows the correct RoutePrefix (it is a guid). But anyone who knows the basepath of my application, when access for example myapp.com/swagger/v1/swagger.json can view the content. How can I protect this endpoint?
I have been tried to use a middleware, i think this is a little bit complex to my problem.
BRENO SANTOS BARROSO Breno Bar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.