From d3eb1bb66cde4d3b5b0c1ff5025eb2fd8e0001fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szak=C3=A1ts=20Alp=C3=A1r=20Zsolt?= Date: Sat, 16 Aug 2025 22:04:10 +0200 Subject: [PATCH] Updates docker config and adds HttpContext Removes a redundant host config in the docker file. Adds HttpContextAccessor to the service collection. This component is used to provide access to the current request context. --- .gitea/workflows/docker-build.yml | 2 +- Source/ProofOfConcept/Program.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index b852ccc..2d68027 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -44,7 +44,7 @@ jobs: --name automatic-parking \ --network traefik \ --label 'traefik.enable=true' \ - --label 'traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.app`) || Host(`tesla-connector.automatic-parking.app`)' \ + --label 'traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.app`)' \ --label 'traefik.http.routers.automatic-parking.entrypoints=websecure' \ --label 'traefik.http.routers.automatic-parking.tls.certresolver=le' \ --label 'traefik.http.services.automatic-parking.loadbalancer.server.port=8080' \ diff --git a/Source/ProofOfConcept/Program.cs b/Source/ProofOfConcept/Program.cs index 6547960..47f4f41 100644 --- a/Source/ProofOfConcept/Program.cs +++ b/Source/ProofOfConcept/Program.cs @@ -26,6 +26,7 @@ builder.Services.AddHttpClient(); builder.Services.AddRazorPages(); builder.Services.AddHealthChecks() .AddAsyncCheck("", cancellationToken => Task.FromResult(HealthCheckResult.Healthy()), ["ready"]); //TODO: Check tag +builder.Services.AddHttpContextAccessor(); builder.Services.AddAuthentication(o => {