mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 04:21:52 +00:00
8a65efa441
- Add PostHog client configuration in ui/lib/posthog.ts - Integrate PostHog tracking in auth forms and provider workflows - Add PostHog dependencies (posthog-js and posthog-node) - Update Next.js config for PostHog integration - Add environment variables for PostHog configuration - Update changelog with PostHog integration entry
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
|
|
// HTTP Security Headers
|
|
// 'unsafe-eval' is configured under `script-src` because it is required by NextJS for development mode
|
|
const cspHeader = `
|
|
default-src 'self';
|
|
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com https://www.googletagmanager.com https://*.posthog.com;
|
|
connect-src 'self' https://api.iconify.design https://api.simplesvg.com https://api.unisvg.com https://js.stripe.com https://www.googletagmanager.com https://*.posthog.com;
|
|
img-src 'self' https://www.google-analytics.com https://www.googletagmanager.com https://*.posthog.com;
|
|
font-src 'self';
|
|
style-src 'self' 'unsafe-inline';
|
|
frame-src 'self' https://js.stripe.com https://www.googletagmanager.com https://*.posthog.com;
|
|
frame-ancestors 'none';
|
|
`;
|
|
|
|
module.exports = {
|
|
poweredByHeader: false,
|
|
output: "standalone",
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{
|
|
key: "Content-Security-Policy",
|
|
value: cspHeader.replace(/\n/g, ""),
|
|
},
|
|
{
|
|
key: "X-Content-Type-Options",
|
|
value: "nosniff",
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "strict-origin-when-cross-origin",
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|