mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
fix: Remove 'upgrade-insecure-requests' for self-host
This commit is contained in:
1 parent
757c1302eb
commit
6bfd87b68e
1 file changed
+9
-6
@@ -12,6 +12,14 @@ const withTM = require('next-transpile-modules')(['ui', 'common'])
|
||||
// https://nextjs.org/docs/api-reference/next.config.js/introduction
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
|
||||
const csp = [
|
||||
"frame-ancestors 'none';",
|
||||
// IS_PLATFORM
|
||||
process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' ? 'upgrade-insecure-requests;' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
const nextConfig = {
|
||||
async redirects() {
|
||||
return [
|
||||
@@ -137,12 +145,7 @@ const nextConfig = {
|
||||
},
|
||||
{
|
||||
key: 'Content-Security-Policy',
|
||||
value: `
|
||||
frame-ancestors 'none';
|
||||
upgrade-insecure-requests;
|
||||
`
|
||||
.replace(/\s{2,}/g, ' ')
|
||||
.trim(),
|
||||
value: csp,
|
||||
},
|
||||
{
|
||||
key: 'Referrer-Policy',
|
||||
|
||||
Reference in new issue
Block a user