π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Apparently shared albums code also uses the upload URL
Manav Rathi1dffe49069bb
diff --git a/infra/workers/uploader/src/index.ts b/infra/workers/uploader/src/index.tsindex cd414815ba..27f701c2a7 100644--- a/infra/workers/uploader/src/index.ts+++ b/infra/workers/uploader/src/index.ts@@ -39,20 +39,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;}};