feat: add www-non-www redirects to traefik
This commit is contained in:
parent
64a7f27e37
commit
963c519c38
@ -101,12 +101,27 @@ function generate_default_proxy_configuration(Server $server)
|
||||
$labels = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.traefik.entrypoints=http",
|
||||
"traefik.http.routers.traefik.middlewares=traefik-basic-auth@file",
|
||||
"traefik.http.routers.traefik.service=api@internal",
|
||||
"traefik.http.services.traefik.loadbalancer.server.port=8080",
|
||||
// Global Middlewares
|
||||
"traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https",
|
||||
"traefik.http.middlewares.gzip.compress=true",
|
||||
// https WWW to non-WWW
|
||||
"traefik.http.middlewares.https-www-to-non-www.redirectregex.regex=^https?://www\\.(.+)",
|
||||
"traefik.http.middlewares.https-www-to-non-www.redirectregex.replacement=https://\$1",
|
||||
"traefik.http.middlewares.https-www-to-non-www.redirectregex.permanent=true",
|
||||
// https Non-WWW to WWW
|
||||
"traefik.http.middlewares.https-non-www-to-www.redirectregex.regex=^https?://(?:www\\.)?(.+)",
|
||||
"traefik.http.middlewares.https-non-www-to-www.redirectregex.replacement=https://www.\$\${1}",
|
||||
"traefik.http.middlewares.https-non-www-to-www.redirectregex.permanent=true",
|
||||
// http www to non-WWW
|
||||
"traefik.http.middlewares.http-www-to-non-www.redirectregex.regex=^http://www\\.(.+)",
|
||||
"traefik.http.middlewares.http-www-to-non-www.redirectregex.replacement=http://\$1",
|
||||
"traefik.http.middlewares.http-www-to-non-www.redirectregex.permanent=true",
|
||||
// http Non-WWW to WWW
|
||||
"traefik.http.middlewares.http-non-www-to-www.redirectregex.regex=^http://(?:www\\.)?(.+)",
|
||||
"traefik.http.middlewares.http-non-www-to-www.redirectregex.replacement=http://www.\$\${1}",
|
||||
"traefik.http.middlewares.http-non-www-to-www.redirectregex.permanent=true",
|
||||
];
|
||||
$config = [
|
||||
"version" => "3.8",
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.182',
|
||||
'release' => '4.0.0-beta.183',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.182';
|
||||
return '4.0.0-beta.183';
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.182"
|
||||
"version": "4.0.0-beta.183"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user