mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-08 06:08:30 +02:00
Fixed #694
- Uncommented the delete proxy rule button - Added redirection path escape in dpcore
This commit is contained in:
@@ -330,7 +330,10 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request, rrr
|
||||
locationRewrite := res.Header.Get("Location")
|
||||
originLocation := res.Header.Get("Location")
|
||||
res.Header.Set("zr-origin-location", originLocation)
|
||||
|
||||
decodedOriginLocation, err := url.PathUnescape(originLocation)
|
||||
if err == nil {
|
||||
originLocation = decodedOriginLocation
|
||||
}
|
||||
if strings.HasPrefix(originLocation, "http://") || strings.HasPrefix(originLocation, "https://") {
|
||||
//Full path
|
||||
//Replace the forwarded target with expected Host
|
||||
|
Reference in New Issue
Block a user