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;
}
@@ -6,7 +6,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "todos",
"applicationUrl": "http://localhost:5069",
"applicationUrl": "https://localhost:5069",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
+1 -1
View File
@@ -2,7 +2,7 @@
"DefaultConnection": {
"ConnectionString": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WorkFlowCheckDB;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False"
},
"ApiKey": "YOUR_SECRET_API_KEY",
"ApiKey": "RUJeLSpSMzVASUdaRCEzUyYxRSE0VyFISFRSJC0zRzhLM1hCSDU=",
"Logging": {
"LogLevel": {
"Default": "Information",