简体   繁体   English

如何在 .NET Core 中控制对 swagger doc 的访问?

[英]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?如何限制人们对文档的访问?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Swagger 与 .net core 3.1 和 Lambda - Swagger with .net core 3.1 and Lambda .Net Core / Angular 6-Access-Control-Allow-Origin不允许使用Origin - .Net Core / Angular 6 - Origin is not allowed by Access-Control-Allow-Origin Cors Error 'Access Control Allow Origin' while calling .net core web api from .net core mvc - Cors Error 'Access Control Allow Origin' while calling .net core web api from .net core mvc Swagger 像 RabbitMq .net 核心的描述 - Swagger like description for RabbitMq .net core asp.net核心招式RoutePrefix - asp.net core swagger RoutePrefix .Net Core 在 Swagger 中显示 DataMember 名称 - .Net Core display DataMember name in Swagger ASP.NET Core Web Api发送Access-Control-Allow-Origin:null CORS头和chrome是错误的,如何修复? - ASP.NET Core Web Api sending Access-Control-Allow-Origin: null CORS header and chrome is erroring, how to fix? 如何在.net中将doc转换为jpg - How to Convert doc to jpg in .net 如何从 ASP.NET Core MVC #control 设置自动滚动 - How to set a autoscroll from ASP.NET Core MVC #control 如何使用 ASP.NET Core 2.2 和 Swashbuckle.AspNetCore 5.4.1 针对 .NET Framework 4.8 生成 Swagger 文件 - How generate Swagger file with ASP.NET Core 2.2 and Swashbuckle.AspNetCore 5.4.1 targeting .NET Framework 4.8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM