Traefik in Kubernetes: различия между версиями
Перейти к навигации
Перейти к поиску
Sol (обсуждение | вклад) |
Sol (обсуждение | вклад) |
||
Строка 18: | Строка 18: | ||
=== Headers === | === Headers === | ||
+ | <syntaxhighlight lang="yaml"> | ||
+ | --- | ||
+ | apiVersion: traefik.containo.us/v1alpha1 | ||
+ | kind: Middleware | ||
+ | metadata: | ||
+ | name: headers-back-office | ||
+ | spec: | ||
+ | headers: | ||
+ | accessControlAllowMethods: | ||
+ | - "GET" | ||
+ | - "OPTIONS" | ||
+ | - "PUT" | ||
+ | - "POST" | ||
+ | - "DELETE" | ||
+ | accessControlAllowHeaders: | ||
+ | - '*' | ||
+ | accessControlAllowOriginList: | ||
+ | - "*" | ||
+ | accessControlMaxAge: 100 | ||
+ | accessControlExposeHeaders: | ||
+ | - '*' | ||
+ | addVaryHeader: true | ||
+ | customResponseHeaders: | ||
+ | Server: "" # Remove web server name and version | ||
+ | </syntaxhighlight> |
Версия 21:03, 20 апреля 2022
TLS options
---
apiVersion: traefik.containo.us/v1alpha1
kind: TLSOption
metadata:
name: default
spec:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 # TLS 1.2
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 # TLS 1.2
- TLS_AES_256_GCM_SHA384 # TLS 1.3
- TLS_CHACHA20_POLY1305_SHA256 # TLS 1.3
Headers
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: headers-back-office
spec:
headers:
accessControlAllowMethods:
- "GET"
- "OPTIONS"
- "PUT"
- "POST"
- "DELETE"
accessControlAllowHeaders:
- '*'
accessControlAllowOriginList:
- "*"
accessControlMaxAge: 100
accessControlExposeHeaders:
- '*'
addVaryHeader: true
customResponseHeaders:
Server: "" # Remove web server name and version