From 7444f9981e3df243865f66572eac8a25ffb8c2f1 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Thu, 7 Mar 2024 10:53:43 +0100 Subject: [PATCH] implement fix --- services/context/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/context/base.go b/services/context/base.go index c4aa467ff4..25ff935055 100644 --- a/services/context/base.go +++ b/services/context/base.go @@ -256,7 +256,7 @@ func (b *Base) Redirect(location string, status ...int) { code = status[0] } - if strings.Contains(location, "://") || strings.HasPrefix(location, "//") { + if httplib.IsRiskyRedirectURL(location) { // Some browsers (Safari) have buggy behavior for Cookie + Cache + External Redirection, eg: /my-path => https://other/path // 1. the first request to "/my-path" contains cookie // 2. some time later, the request to "/my-path" doesn't contain cookie (caused by Prevent web tracking)