diff --git a/src/WorkFlowCheck.API/ApiKeyMiddleware.cs b/src/WorkFlowCheck.API/ApiKeyMiddleware.cs index 1420a9d..d20346b 100644 --- a/src/WorkFlowCheck.API/ApiKeyMiddleware.cs +++ b/src/WorkFlowCheck.API/ApiKeyMiddleware.cs @@ -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; } diff --git a/src/WorkFlowCheck.API/Properties/launchSettings.json b/src/WorkFlowCheck.API/Properties/launchSettings.json index 08a8bf8..55f2dec 100644 --- a/src/WorkFlowCheck.API/Properties/launchSettings.json +++ b/src/WorkFlowCheck.API/Properties/launchSettings.json @@ -6,7 +6,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "todos", - "applicationUrl": "http://localhost:5069", + "applicationUrl": "https://localhost:5069", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/WorkFlowCheck.API/appsettings.json b/src/WorkFlowCheck.API/appsettings.json index e753dd1..6e69caf 100644 --- a/src/WorkFlowCheck.API/appsettings.json +++ b/src/WorkFlowCheck.API/appsettings.json @@ -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", diff --git a/src/WorkFlowCheck.MAUI/App.xaml.cs b/src/WorkFlowCheck.MAUI/App.xaml.cs index 83841dd..93e166a 100644 --- a/src/WorkFlowCheck.MAUI/App.xaml.cs +++ b/src/WorkFlowCheck.MAUI/App.xaml.cs @@ -1,12 +1,19 @@ -namespace WorkFlowCheck.MAUI +using Microsoft.Extensions.DependencyInjection; +using WorkFlowCheck.MAUI.Services; + +namespace WorkFlowCheck.MAUI { public partial class App : Application { - public App() + public App(IServiceProvider serviceProvider) { InitializeComponent(); - MainPage = new AppShell(); + //MainPage = new AppShell(); + var mainPage = new MainPage(); + mainPage.Initialize(serviceProvider.GetRequiredService()); + MainPage = mainPage; + } } } diff --git a/src/WorkFlowCheck.MAUI/MainPage.xaml b/src/WorkFlowCheck.MAUI/MainPage.xaml index 18d8034..aac399c 100644 --- a/src/WorkFlowCheck.MAUI/MainPage.xaml +++ b/src/WorkFlowCheck.MAUI/MainPage.xaml @@ -7,14 +7,15 @@ - + SemanticProperties.Description="dot net bot in a race car number eight" />-->