mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-05 02:24:59 +02:00
allow controlling cors from config and add cors middleware to traefik
This commit is contained in:
parent
7ff5376d13
commit
ab18e15a71
8 changed files with 98 additions and 43 deletions
|
@ -4,6 +4,21 @@ http:
|
|||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
cors:
|
||||
headers:
|
||||
accessControlAllowMethods:
|
||||
- GET
|
||||
- PUT
|
||||
- POST
|
||||
- DELETE
|
||||
- PATCH
|
||||
accessControlAllowHeaders:
|
||||
- Content-Type
|
||||
- X-CSRF-Token
|
||||
accessControlAllowOriginList:
|
||||
- https://{{.DashboardDomain}}
|
||||
accessControlAllowCredentials: false
|
||||
|
||||
|
||||
routers:
|
||||
# HTTP to HTTPS redirect router
|
||||
|
@ -14,6 +29,7 @@ http:
|
|||
- web
|
||||
middlewares:
|
||||
- redirect-to-https
|
||||
- cors
|
||||
|
||||
# Next.js router (handles everything except API and WebSocket paths)
|
||||
next-router:
|
||||
|
@ -21,6 +37,8 @@ http:
|
|||
service: next-service
|
||||
entryPoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- cors
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
|
||||
|
@ -30,6 +48,8 @@ http:
|
|||
service: api-service
|
||||
entryPoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- cors
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
|
||||
|
@ -39,6 +59,8 @@ http:
|
|||
service: api-service
|
||||
entryPoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- cors
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue