Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: configures report-only CSP for lab #2388

Merged
merged 19 commits into from
Jul 9, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/laboratory/next.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
/** @type {import('next').NextConfig} */
const cspHeader = `
bkrem marked this conversation as resolved.
Show resolved Hide resolved
default-src 'self';
script-src 'self' 'unsafe-inline';
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
img-src 'self' data: blob: https://walletconnect.org https://walletconnect.com https://secure.walletconnect.com https://secure.walletconnect.org https://avatars.githubusercontent.com https://tokens-data.1inch.io https://tokens.1inch.io https://ipfs.io;
chris13524 marked this conversation as resolved.
Show resolved Hide resolved
font-src 'self' https://fonts.gstatic.com;
connect-src 'self' https://rpc.walletconnect.com https://rpc.walletconnect.org https://explorer.walletconnect.com https://explorer.walletconnect.org https://relay.walletconnect.com https://relay.walletconnect.org wss://relay.walletconnect.com wss://relay.walletconnect.org https://pulse.walletconnect.com https://pulse.walletconnect.org https://api.web3modal.com https://api.web3modal.org https://o1095249.ingest.sentry.io https://arb1.arbitrum.io;
bkrem marked this conversation as resolved.
Show resolved Hide resolved
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org;
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
`

const nextConfig = {
reactStrictMode: true,
trailingSlash: true,
distDir: 'out',
cleanDistDir: true,
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Content-Security-Policy-Report-Only',
value: cspHeader.replace(/\n/g, ' ').trim()
}
]
},
{
source: '/.well-known/apple-app-site-association',
headers: [{ key: 'content-type', value: 'application/json' }]
Expand Down
Loading