Skip to content

Commit bc39d13

Browse files
committed
fix
1 parent 9730d3a commit bc39d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/context/base.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func (b *Base) Redirect(location string, status ...int) {
256256
code = status[0]
257257
}
258258

259-
if strings.Contains(location, "://") || strings.HasPrefix(location, "//") {
259+
if strings.HasPrefix(location, "http://") || strings.HasPrefix(location, "https://") || strings.HasPrefix(location, "//") {
260260
// Some browsers (Safari) have buggy behavior for Cookie + Cache + External Redirection, eg: /my-path => https://other/path
261261
// 1. the first request to "/my-path" contains cookie
262262
// 2. some time later, the request to "/my-path" doesn't contain cookie (caused by Prevent web tracking)

0 commit comments

Comments
 (0)