Answer domain redirects from the edge, with or without Traefik
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad56fa4e3a
commit
b46e0813fe
6 files changed
+89
-13
No files matched your search
@@ -264,6 +264,16 @@ func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
b.logAccess(entry)
|
||||
}()
|
||||
|
||||
if ms.m.IsRedirect() {
|
||||
code := http.StatusFound
|
||||
if ms.m.RedirectPermanent {
|
||||
code = http.StatusMovedPermanently
|
||||
}
|
||||
entry.Result = "redirect"
|
||||
http.Redirect(rec, r, ms.m.RedirectLocation(r.URL.RequestURI()), code)
|
||||
return
|
||||
}
|
||||
|
||||
secure := l.kind == model.ProtoHTTPS
|
||||
scheme := "http"
|
||||
if secure {
|
||||
|
||||
Reference in new issue
Block a user