1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Server: Fixes #12947 Skip CORS check for SAML callback (#12948)

Co-authored-by: yuudi <yuudi@users.noreply.github.com>
This commit is contained in:
yuudi
2025-08-18 07:10:20 -06:00
committed by GitHub
parent 60b6db8cd4
commit c36289c024

View File

@@ -146,6 +146,9 @@ async function main() {
}
function acceptOrigin(origin: string): boolean {
// Origin can be string "null"
if (origin === 'null') return false;
const hostname = (new URL(origin)).hostname;
const userContentDomain = envVariables.USER_CONTENT_BASE_URL ? (new URL(envVariables.USER_CONTENT_BASE_URL)).hostname : '';