From 90845bdb02b79cd27e9c5d908d26afcb2d43e776 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sun, 16 Jun 2024 14:12:16 +0530 Subject: [PATCH] Rename --- infra/workers/thumbnails/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/workers/thumbnails/src/index.ts b/infra/workers/thumbnails/src/index.ts index 24fc705a7f..ac91628d9e 100644 --- a/infra/workers/thumbnails/src/index.ts +++ b/infra/workers/thumbnails/src/index.ts @@ -33,7 +33,7 @@ const handleOPTIONS = (request: Request) => { const isAllowedOrigin = (origin: string | null) => { const desktopApp = "ente://app"; - const allowedHostname = [ + const allowedHostnames = [ "web.ente.io", "photos.ente.io", "photos.ente.sh", @@ -43,7 +43,7 @@ const isAllowedOrigin = (origin: string | null) => { if (!origin) return false; try { const url = new URL(origin); - return origin == desktopApp || allowedHostname.includes(url.hostname); + return origin == desktopApp || allowedHostnames.includes(url.hostname); } catch { // origin is likely an invalid URL return false;