Add CORS rule for api.truckwash.io and new preflight route

- Introduce preflight handling for `OPTIONS` method on `api.truckwash.io` with high priority routing and secure headers middleware.
- Extend CORS configuration to include `https://api.truckwash.io`.
This commit is contained in:
Jeppe Bundgaard
2026-02-23 23:45:22 +01:00
parent 356e59bd10
commit 629c13499d
+10
View File
@@ -25,6 +25,15 @@ http:
tls:
certResolver: le
api-preflight-io:
rule: Host(`api.truckwash.io`) && Method(`OPTIONS`)
entryPoints: [websecure]
middlewares: [secure-headers]
service: noop@internal
priority: 1000
tls:
certResolver: le
cloud-preflight:
rule: Host(`cloud.truckwash.dk`) && Method(`OPTIONS`)
entryPoints: [websecure]
@@ -66,6 +75,7 @@ http:
accessControlMaxAge: 86400
accessControlAllowOriginList:
- "https://truckwash.io"
- "https://api.truckwash.io"
- "https://web.truckwash.dk"
- "https://api.truckwash.dk"
- "https://truckwash.dk"