Add auth header to PowerBI Endpoint

This commit is contained in:
Michał Zieliski
2024-06-06 15:28:12 +02:00
parent b0c39b8ec1
commit 5843149651
3 changed files with 9 additions and 0 deletions

View File

@@ -103,6 +103,13 @@ namespace WebAPI.Controllers
{
return Unauthorized();
}
if (
!Request.Headers.TryGetValue("D-BI-AUTH", out var authKey)
|| authKey != configuration["authKey"])
{
return Unauthorized();
}
try
{
return Ok(db.Layers