mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-07 05:38:30 +02:00
Patching redirection bug
+ Added wip basic auth editor custom exception rules + Added custom logic to handle apache screw up redirect header
This commit is contained in:
@@ -25,7 +25,9 @@ func replaceLocationHost(urlString string, rrr *ResponseRewriteRuleSet, useTLS b
|
||||
//E.g. Proxy config: blog.example.com -> example.com/blog
|
||||
//Check if it is actually redirecting to example.com instead of a new domain
|
||||
//like news.example.com.
|
||||
if rrr.ProxyDomain != u.Host {
|
||||
// The later check bypass apache screw up method of redirection header
|
||||
// e.g. https://imuslab.com -> http://imuslab.com:443
|
||||
if rrr.ProxyDomain != u.Host && !strings.Contains(u.Host, rrr.OriginalHost+":") {
|
||||
//New location domain not matching proxy target domain.
|
||||
//Do not modify location header
|
||||
return urlString, nil
|
||||
|
Reference in New Issue
Block a user