Na, majd otthon ...

This commit is contained in:
Iván Szabó
2025-01-06 12:49:34 +01:00
parent a80870b5c3
commit 92801fefb9
11 changed files with 106 additions and 18 deletions
@@ -15,6 +15,7 @@
if (!context.Request.Headers.TryGetValue(ApiKeyHeaderName, out var extractedApiKey))
{
context.Response.StatusCode = 401; // Unauthorized
context.Response.ContentType = "text/html; charset=utf-8";
await context.Response.WriteAsync("API Key hiányzik.");
return;
}
@@ -25,6 +26,7 @@
if (!apiKey.Equals(extractedApiKey))
{
context.Response.StatusCode = 403; // Forbidden
context.Response.ContentType = "text/html; charset=utf-8";
await context.Response.WriteAsync("Helytelen API Key.");
return;
}