Force SSR to include CSP nonces on page reload (#818)
This commit is contained in:
parent
a6aebd7004
commit
2bbcbfbb26
|
@ -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 (
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue