Require loggedin user for docs? (#1567)

* Require loggedin user for docs?

We had talked before that docs should be for authorized users only. We had it in when we had Nswag but must have lost it after we switch to manual swagger files

* fix
This commit is contained in:
Andrew Camilleri
2020-05-23 21:18:51 +02:00
committed by GitHub
parent 79b034b505
commit cdf6886c39
2 changed files with 8 additions and 2 deletions

View File

@@ -114,6 +114,7 @@ namespace BTCPayServer.Controllers
}
[Route("swagger/v1/swagger.json")]
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie+","+ AuthenticationSchemes.Greenfield)]
public async Task<IActionResult> Swagger()
{
JObject json = new JObject();
@@ -131,6 +132,7 @@ namespace BTCPayServer.Controllers
}
[Route("docs")]
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
public IActionResult SwaggerDocs()
{
return View();