20 lines
473 B
YAML
20 lines
473 B
YAML
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: {{$.Release.Name}}-cors
|
|
namespace: {{$.Release.Namespace}}
|
|
spec:
|
|
headers:
|
|
accessControlAllowMethods:
|
|
- "GET"
|
|
- "POST"
|
|
- "PUT"
|
|
- "DELETE"
|
|
- "OPTIONS"
|
|
accessControlAllowHeaders:
|
|
- "Content-Type"
|
|
- "Authorization"
|
|
accessControlAllowOriginList:
|
|
- "*" # или конкретный домен
|
|
accessControlMaxAge: 100
|
|
addVaryHeader: true |