-
Notifications
You must be signed in to change notification settings - Fork 1
/
dynamic.yml
36 lines (34 loc) · 1.41 KB
/
dynamic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
tls:
options:
default:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
mintls13:
minVersion: VersionTLS13
http:
middlewares:
# Redirect non-www URLs to their www equivalent
# Use with traefik.http.routers.myRouter.middlewares: "redirect-non-www-to-www@file"
redirect-non-www-to-www:
# Redirect a request from an url to another with regex matching and replacement
redirectregex:
# Apply a permanent redirection (HTTP 301)
permanent: true
# The regular expression to match and capture elements from the request URL
regex: "^https?://(?:www\\.)?(.+)"
# How to modify the URL to have the new target URL
replacement: "https://www.${1}"
# Redirect www URLs to their non-www equivalent
# Use with traefik.http.routers.myRouter.middlewares: "redirect-www-to-non-www@file"
redirect-www-to-non-www:
# Redirect a request from an url to another with regex matching and replacement
redirectregex:
# Apply a permanent redirection (HTTP 301)
permanent: true
# The regular expression to match and capture elements from the request URL
regex: "^https?://www\\.(.+)"
# How to modify the URL to have the new target URL
replacement: "https://${1}"