Force SSR to include CSP nonces on page reload (#818)

This commit is contained in:
ekzyis 2024-02-13 23:40:26 +01:00 committed by GitHub
parent a6aebd7004
commit 2bbcbfbb26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,9 @@
import Image from 'react-bootstrap/Image'
import { StaticLayout } from '../components/layout'
import { getGetServerSideProps } from '../api/ssrApollo'
// force SSR to include CSP nonces
export const getServerSideProps = getGetServerSideProps({ query: null })
export default function Email () {
return (

View File

@ -8,6 +8,10 @@ import styles from '../../styles/invites.module.css'
import Invite from '../../components/invite'
import { inviteSchema } from '../../lib/validate'
import { SSR } from '../../lib/constants'
import { getGetServerSideProps } from '../../api/ssrApollo'
// force SSR to include CSP nonces
export const getServerSideProps = getGetServerSideProps({ query: null })
function InviteForm () {
const [createInvite] = useMutation(

View File

@ -5,6 +5,10 @@ import { CenterLayout } from '../../components/layout'
import { useRouter } from 'next/router'
import { INVOICE } from '../../fragments/wallet'
import { SSR } from '../../lib/constants'
import { getGetServerSideProps } from '../../api/ssrApollo'
// force SSR to include CSP nonces
export const getServerSideProps = getGetServerSideProps({ query: null })
export default function FullInvoice () {
const router = useRouter()

View File

@ -3,6 +3,10 @@ import { CenterLayout } from '../components/layout'
import Snl from '../components/snl'
import { gql } from 'graphql-tag'
import { useMutation, useQuery } from '@apollo/client'
import { getGetServerSideProps } from '../api/ssrApollo'
// force SSR to include CSP nonces
export const getServerSideProps = getGetServerSideProps({ query: null })
export default function Index () {
const [toggle] = useMutation(

View File

@ -15,6 +15,10 @@ import { useToast } from '../../components/toast'
import { gql } from 'graphql-tag'
import { useShowModal } from '../../components/modal'
import { DeleteConfirm } from '../../components/delete'
import { getGetServerSideProps } from '../../api/ssrApollo'
// force SSR to include CSP nonces
export const getServerSideProps = getGetServerSideProps({ query: null })
export default function Withdrawl () {
return (