0

I have ASP.NET Web API 2 and have configured Swagger using NSwag. I want to restrict access to the Swagger page, expicially in the production environment.

It is my intention to incorporate a login authentication page, so I tried using ActionFilters, but no filter events are triggered when accessing the Swagger page.

Could you please advise on how I can achieve this? Please let me know if I should provide more detail.

Thanks!

0 Answers0