π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Allow albums.ente.io/sh
Manav Rathi7566702569df
diff --git a/infra/workers/files/src/index.ts b/infra/workers/files/src/index.tsindex 7a5c982309..a2621941ca 100644--- a/infra/workers/files/src/index.ts+++ b/infra/workers/files/src/index.ts@@ -32,20 +32,18 @@ const handleOPTIONS = (request: Request) => {};const isAllowedOrigin = (origin: string | null) => {- const desktopApp = "ente://app";- const allowedHostnames = [- "web.ente.io",- "photos.ente.io",- "photos.ente.sh",- "localhost",- ];-if (!origin) return false;try {const url = new URL(origin);- return origin == desktopApp || allowedHostnames.includes(url.hostname);+ const hostname = url.hostname;+ return (+ origin == "ente://app" /* desktop app */ ||+ hostname.endsWith("ente.io") ||+ hostname.endsWith("ente.sh") ||+ hostname == "localhost"+ );} catch {- // origin is likely an invalid URL+ // `origin` is likely an invalid URL.return false;}};