mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user