OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
allow cors
Carl-Gerhard Lindesvärd853e6adbe27d
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjsindex 959ac96cf..696f73465 100644--- a/apps/web/next.config.mjs+++ b/apps/web/next.config.mjs@@ -19,6 +19,23 @@ const config = {locales: ['en'],defaultLocale: 'en',},+ async headers() {+ return [+ {+ source: '/api/sdk/:path*',+ headers: [+ { key: 'Access-Control-Allow-Credentials', value: 'true' },+ { key: 'Access-Control-Allow-Origin', value: '*' },+ { key: 'Access-Control-Allow-Methods', value: 'POST,PUT' },+ // {+ // key: 'Access-Control-Allow-Headers',+ // value:+ // 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',+ // },+ ],+ },+ ];+ },};export default config;