sdfdsf
This commit is contained in:
parent
834aa48d09
commit
06f6ee43cc
|
|
@ -105,40 +105,38 @@ gregknoppcpa.bayarea-cc.com {
|
||||||
}
|
}
|
||||||
encode gzip
|
encode gzip
|
||||||
}
|
}
|
||||||
iitwelders.bayarea-cc.com {
|
|
||||||
# KEIN encode hier oben – wir setzen encode im route-Block, damit die Reihenfolge fix ist.
|
|
||||||
|
|
||||||
|
iitwelders.bayarea-cc.com {
|
||||||
route {
|
route {
|
||||||
# 1) Hole die Seite unkomprimiert vom Origin
|
# 1) Nur Text-Responses bearbeiten (HTML, CSS, JS, JSON, XML ...)
|
||||||
|
@text header Content-Type *text/* *javascript* *json* *xml*
|
||||||
|
|
||||||
|
# 2) Replace-Handler (muss VOR dem Proxy stehen!)
|
||||||
|
replace @text {
|
||||||
|
# Substring-Rewrites
|
||||||
|
https://iitwelders.com https://iitwelders.bayarea-cc.com
|
||||||
|
//iitwelders.com //iitwelders.bayarea-cc.com
|
||||||
|
|
||||||
|
# Optional robuster (Regex, case-insensitive):
|
||||||
|
# re (?i)https://iitwelders\.com https://iitwelders.bayarea-cc.com
|
||||||
|
# re (?i)//iitwelders\.com //iitwelders.bayarea-cc.com
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3) Proxy holt unkomprimiert vom Origin (damit replace arbeiten kann)
|
||||||
reverse_proxy https://iitwelders.com {
|
reverse_proxy https://iitwelders.com {
|
||||||
header_up Host iitwelders.com
|
header_up Host iitwelders.com
|
||||||
header_up Accept-Encoding identity # Origin soll NICHT komprimieren
|
header_up Accept-Encoding identity
|
||||||
transport http {
|
transport http {
|
||||||
tls_server_name iitwelders.com
|
tls_server_name iitwelders.com
|
||||||
}
|
}
|
||||||
# falls doch mal Redirects kommen: Location-Header auf Proxy-Domain biegen
|
# Falls 30x zurückkommt: Location auf Proxy-Domain biegen
|
||||||
header_down Location https://iitwelders.bayarea-cc.com{uri}
|
header_down Location https://iitwelders.bayarea-cc.com{uri}
|
||||||
}
|
}
|
||||||
|
|
||||||
# 2) Ersetze absolute iitwelders-Links in Text-Antworten (HTML, CSS, JS, JSON, XML etc.)
|
# 4) Zum Schluss für den Client komprimieren
|
||||||
@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
|
encode zstd gzip
|
||||||
}
|
}
|
||||||
|
|
||||||
# Healthcheck
|
|
||||||
@health path /_health
|
@health path /_health
|
||||||
respond @health "ok" 200
|
respond @health "ok" 200
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue