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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user