From a8a415b71f8dd6bbf0381dd65b3e9d8a63e94576 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Fri, 21 Oct 2016 19:01:49 +0000 Subject: [PATCH] [fix] support all kind of http redirections git-svn-id: file:///srv/svn/repo/yukari/trunk@7 f3bd38d9-da89-464d-a02a-eb04e43141b5 --- morty.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morty.go b/morty.go index 952a297..fe44f60 100644 --- a/morty.go +++ b/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))