mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 09:31:11 -05:00
implement fix
This commit is contained in:
parent
20bc8662b1
commit
3877a2332b
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ func (b *Base) Redirect(location string, status ...int) {
|
||||||
code = status[0]
|
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
|
// 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
|
// 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)
|
// 2. some time later, the request to "/my-path" doesn't contain cookie (caused by Prevent web tracking)
|
||||||
|
|
Loading…
Reference in a new issue