Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added response headers

Blue Mouse388be596e8dc
diff --git a/app/root.tsx b/app/root.tsx
index a75864e3a..981fb1fc0 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -1,4 +1,4 @@
-import type { LinksFunction, LoaderArgs, V2_MetaFunction } from '@remix-run/node'
+import type { LinksFunction, LoaderArgs, V2_MetaFunction, HeadersFunction } from '@remix-run/node'
import { json } from '@remix-run/node'
import {
Links,
@@ -83,6 +83,17 @@ export const meta: V2_MetaFunction = () => [
// { name: 'application-name', content: 'Swetrix' },
]
+export const headers: HeadersFunction = () => ({
+ 'access-control-allow-origin': '*',
+ 'Cross-Origin-Embedder-Policy': 'require-corp; report-to="default";',
+ 'Cross-Origin-Opener-Policy': 'same-site; report-to="default";',
+ 'Cross-Origin-Resource-Policy': 'cross-origin',
+ 'Permissions-Policy': 'interest-cohort=()',
+ 'Referrer-Policy': 'strict-origin-when-cross-origin',
+ 'X-Powered-By': 'Mountain Dew',
+ 'X-XSS-Protection': '1; mode=block',
+})
+
// const removeObsoleteAuthTokens = () => {
// const accessToken = getAccessToken()
// const refreshToken = getRefreshToken()