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 1 commit
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' 'unsafe-eval';
bkrem marked this conversation as resolved.
Show resolved Hide resolved
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
img-src 'self' data: https://walletconnect.org;
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;
chris13524 marked this conversation as resolved.
Show resolved Hide resolved
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org;
chris13524 marked this conversation as resolved.
Show resolved Hide resolved
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