30 lines
701 B
YAML
30 lines
701 B
YAML
# Traefik Middleware - CORS 配置
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: cors-headers
|
|
namespace: registry-system
|
|
spec:
|
|
headers:
|
|
accessControlAllowMethods:
|
|
- "GET"
|
|
- "HEAD"
|
|
- "POST"
|
|
- "PUT"
|
|
- "DELETE"
|
|
- "OPTIONS"
|
|
accessControlAllowOriginList:
|
|
- "http://registry.u6.net3w.com"
|
|
- "https://registry.u6.net3w.com"
|
|
accessControlAllowCredentials: true
|
|
accessControlAllowHeaders:
|
|
- "Authorization"
|
|
- "Content-Type"
|
|
- "Accept"
|
|
- "Cache-Control"
|
|
accessControlExposeHeaders:
|
|
- "Docker-Content-Digest"
|
|
- "WWW-Authenticate"
|
|
accessControlMaxAge: 100
|
|
addVaryHeader: true
|