Na, majd otthon ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user