traefik fix
This commit is contained in:
parent
d625caa14d
commit
7e234dc754
1 changed files with 10 additions and 5 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
"router" = { dest = "http://router.dns.${homelab.domain}:80"; auth = false; };
|
"router" = { dest = "http://router.dns.${homelab.domain}:80"; auth = false; };
|
||||||
"home" = { dest = "http://home.dns.${homelab.domain}:8123"; auth = false; };
|
"home" = { dest = "http://home.dns.${homelab.domain}:8123"; auth = false; };
|
||||||
|
|
||||||
|
# "dynamic" = { dest = "http://127.0.0.1:8080"; auth = true; };
|
||||||
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
||||||
|
|
||||||
"containers" = { dest = "http://localhost:5001"; auth = false; };
|
"containers" = { dest = "http://localhost:5001"; auth = false; };
|
||||||
|
|
@ -23,9 +24,6 @@
|
||||||
"immich" = "https://gallery.proxy${homelab.domain}";
|
"immich" = "https://gallery.proxy${homelab.domain}";
|
||||||
};
|
};
|
||||||
exta-conf = ''
|
exta-conf = ''
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
# proxy_set_header X-Auth-User $remote_user;
|
# proxy_set_header X-Auth-User $remote_user;
|
||||||
|
|
@ -76,7 +74,7 @@ in {
|
||||||
} // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair "${subdomain}.${base}" {
|
} // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair "${subdomain}.${base}" {
|
||||||
useACMEHost = base;
|
useACMEHost = base;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".return = "301 https://${base}$request_uri";
|
locations."/".return = "301 ${base}";
|
||||||
}) redirects // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") {
|
}) redirects // lib.mapAttrs' (subdomain: cfg: lib.nameValuePair (if subdomain == "@" then base else "${subdomain}.${base}") {
|
||||||
useACMEHost = base;
|
useACMEHost = base;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
@ -95,7 +93,14 @@ in {
|
||||||
traefik = {
|
traefik = {
|
||||||
enable = true;
|
enable = true;
|
||||||
staticConfigOptions = {
|
staticConfigOptions = {
|
||||||
entryPoints.web.address = "127.0.0.1:81";
|
entryPoints.web = {
|
||||||
|
address = "127.0.0.1:81";
|
||||||
|
forwardedHeaders.trustedIPs = [ "127.0.0.1/32" ];
|
||||||
|
};
|
||||||
|
# api = {
|
||||||
|
# dashboard = true;
|
||||||
|
# insecure = true;
|
||||||
|
# };
|
||||||
global = {
|
global = {
|
||||||
checkNewVersion = false;
|
checkNewVersion = false;
|
||||||
sendAnonymousUsage = false;
|
sendAnonymousUsage = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue