[fix] support all kind of http redirections
git-svn-id: file:///srv/svn/repo/yukari/trunk@7 f3bd38d9-da89-464d-a02a-eb04e43141b5
This commit is contained in:
parent
577232c4e8
commit
a8a415b71f
2
morty.go
2
morty.go
@ -176,7 +176,7 @@ func (p *Proxy) RequestHandler(ctx *fasthttp.RequestCtx) {
|
||||
|
||||
if resp.StatusCode() != 200 {
|
||||
switch resp.StatusCode() {
|
||||
case 301, 302:
|
||||
case 301, 302, 303, 307, 308:
|
||||
loc := resp.Header.Peek("Location")
|
||||
if loc != nil {
|
||||
url, err := proxifyURI(&RequestConfig{p.Key, parsedURI}, string(loc))
|
||||
|
Loading…
x
Reference in New Issue
Block a user