Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Reverted headers.

Mike Cao1063980b4313
diff --git a/next.config.ts b/next.config.ts
index 5498ad8da..c9c717f94 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -40,8 +40,6 @@ function normalizePath(url: string) {
}
const apiUrlOrigin = getUrlOrigin(apiUrl);
-const isAbsoluteApiUrl = Boolean(apiUrlOrigin);
-const allowOrigin = isAbsoluteApiUrl && cloudUrl ? cloudUrl : '*';
const connectSrc = ["'self'", 'https:', apiUrlOrigin].filter(Boolean).join(' ');
const contentSecurityPolicy = `
@@ -86,14 +84,8 @@ const trackerHeaders = [
const apiHeaders = [
{
key: 'Access-Control-Allow-Origin',
- value: allowOrigin,
+ value: '*',
},
- ...(allowOrigin !== '*'
- ? [
- { key: 'Access-Control-Allow-Credentials', value: 'true' },
- { key: 'Vary', value: 'Origin' },
- ]
- : []),
{
key: 'Access-Control-Allow-Headers',
value: '*',