I am seeing no CORS headers in the response
Response Headers
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Cache-Control: no-cache, max-age=0
Content-Length: 2
Content-Type: text/plain; charset=utf-8
Date: Sun, 26 Apr 2020 06:56:15 GMT
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=15552000
Vary: Accept-Encoding
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Traefik
Version: 2.2.0
Codename: chevrotin
Go version: go1.14.1
Built: 2020-03-25T17:32:57Z
OS/Arch: linux/amd64
Configurations
traefik.yaml
accessLog: {}
api:
insecure: true
dashboard: true
log:
level: INFO
format: json
providers:
docker:
endpoint: unix:///var/run/docker.sock
exposedByDefault: false
file:
directory: /etc/traefik/providers
/etc/traefik/providers/file.provider.yaml
http:
middlewares:
for-dev:
chain:
middlewares:
- compress-it
- cors-headers
- security-headers
- cache-headers
compress-it:
compress: {}
security-headers:
headers:
frameDeny: true
contentTypeNosniff: true
referrerPolicy: no-referrer
browserXssFilter: true
stsSeconds: 15552000
forceSTSHeader: true
cors-headers:
headers:
accessControlAllowCredentials: true
accessControlAllowHeaders:
- Origin
- Authorization
- Content-Type
accessControlAllowMethods:
- OPTION
- GET
- POST
- PUT
- PATCH
accessControlAllowOriginList:
- http://example.com
accessControlMaxAge: 100
addVaryHeader: true
cache-headers:
headers:
customResponseHeaders:
Cache-Control: "no-cache, max-age=0"
docker-compose.yaml
backend:
...
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.routers.backend.middlewares=for-dev@file"