mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
fix(core): unable to redirect to same origin paths (#6586)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
export function popupWindow(target: string) {
|
||||
const url = new URL(runtimeConfig.serverUrlPrefix + '/redirect-proxy');
|
||||
target = /^https?:\/\//.test(target)
|
||||
? target
|
||||
: runtimeConfig.serverUrlPrefix + target;
|
||||
url.searchParams.set('redirect_uri', target);
|
||||
|
||||
return window.open(url, '_blank', `noreferrer noopener`);
|
||||
|
||||
Reference in New Issue
Block a user