[英]How control access to swagger doc in .NET Core?
I ran swagger in .NET Core and hit https://url/swagger/index.html
in the browser and saw the program documentation.我在 .NET Core 中运行 swagger 并在浏览器中点击https://url/swagger/index.html
并查看程序文档。
The problem is that anyone can access my program document by entering the above URL into a browser.问题是任何人都可以通过在浏览器中输入上述 URL 来访问我的程序文档。
How can I restrict people's access to the document?如何限制人们对文档的访问?
I had written a detail article with complete solution for same topic last year.去年我写了一篇关于同一主题的完整解决方案的详细文章。 have a look看一看
https://medium.com/@niteshsinghal85/securing-swagger-in-production-92d0a045a5 https://medium.com/@niteshsinghal85/securing-swagger-in-production-92d0a045a5
https://medium.com/@niteshsinghal85/securing-swagger-ui-in-production-in-asp-net-core-part-2-dc2ae0f03c73 https://medium.com/@niteshsinghal85/securing-swagger-ui-in-production-in-asp-net-core-part-2-dc2ae0f03c73
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.