This commit is contained in:
Andreas Knuth 2025-09-11 14:40:42 -05:00
parent e9a266534a
commit 834aa48d09
1 changed files with 28 additions and 24 deletions

View File

@ -106,38 +106,42 @@ gregknoppcpa.bayarea-cc.com {
encode gzip encode gzip
} }
iitwelders.bayarea-cc.com { iitwelders.bayarea-cc.com {
encode zstd gzip # KEIN encode hier oben wir setzen encode im route-Block, damit die Reihenfolge fix ist.
@html header Content-Type text/html* route {
replace @html { # 1) Hole die Seite unkomprimiert vom Origin
https://iitwelders.com https://iitwelders.bayarea-cc.com reverse_proxy https://iitwelders.com {
//iitwelders.com //iitwelders.bayarea-cc.com header_up Host iitwelders.com
} header_up Accept-Encoding identity # Origin soll NICHT komprimieren
transport http {
@assets header Content-Type text/css* text/javascript* application/javascript* application/json* tls_server_name iitwelders.com
replace @assets { }
https://iitwelders.com https://iitwelders.bayarea-cc.com # falls doch mal Redirects kommen: Location-Header auf Proxy-Domain biegen
//iitwelders.com //iitwelders.bayarea-cc.com header_down Location https://iitwelders.bayarea-cc.com{uri}
}
reverse_proxy https://iitwelders.com {
# Upstream nicht komprimieren lassen, sonst kann replace nicht arbeiten
header_up Accept-Encoding identity
header_up Host iitwelders.com
transport http {
tls_server_name iitwelders.com
} }
# etwaige 30x-Location-Header auf deine Domain biegen # 2) Ersetze absolute iitwelders-Links in Text-Antworten (HTML, CSS, JS, JSON, XML etc.)
header_down Location https://iitwelders.bayarea-cc.com{uri} @text header Content-Type *text/* *javascript* *json* *xml*
replace @text {
https://iitwelders.com https://iitwelders.bayarea-cc.com
//iitwelders.com //iitwelders.bayarea-cc.com
}
# Optional: wenn du sehr große Seiten streamen willst (geringerer RAM, evtl. ohne Content-Length):
# replace @text {
# stream
# https://iitwelders.com https://iitwelders.bayarea-cc.com
# //iitwelders.com //iitwelders.bayarea-cc.com
# }
# 3) Zum Schluss komprimieren für den Client
encode zstd gzip
} }
# Healthcheck
@health path /_health @health path /_health
respond @health "ok" 200 respond @health "ok" 200
} }
www.fancytextstuff.com { www.fancytextstuff.com {
redir https://fancytextstuff.com{uri} permanent redir https://fancytextstuff.com{uri} permanent
} }