Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Reduce spurious logs for headers our clients send

Manav Rathi80b34f1aef8d
diff --git a/infra/workers/uploader/src/index.ts b/infra/workers/uploader/src/index.ts
index 3d413d4b3d..d94aeb048c 100644
--- a/infra/workers/uploader/src/index.ts
+++ b/infra/workers/uploader/src/index.ts
@@ -31,7 +31,7 @@ const handleOPTIONS = (request: Request) => {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, PUT, OPTIONS",
"Access-Control-Max-Age": "86400",
- // "Access-Control-Allow-Headers": "UPLOAD-URL",
+ // "Access-Control-Allow-Headers": "Content-Type", "UPLOAD-URL, X-Client-Package",
"Access-Control-Allow-Headers": "*",
"Access-Control-Expose-Headers": "X-Request-Id, CF-Ray",
},
@@ -58,7 +58,7 @@ const isAllowedOrigin = (origin: string | null) => {
};
const areAllowedHeaders = (headers: string | null) => {
- const allowed = ["UPLOAD-URL"];
+ const allowed = ["Content-Type", "UPLOAD-URL", "X-Client-Package"];
if (!headers) return true;
for (const header of headers.split(",")) {