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 Image from 'react-bootstrap/Image'
|
||||||
import { StaticLayout } from '../components/layout'
|
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 () {
|
export default function Email () {
|
||||||
return (
|
return (
|
||||||
|
@ -8,6 +8,10 @@ import styles from '../../styles/invites.module.css'
|
|||||||
import Invite from '../../components/invite'
|
import Invite from '../../components/invite'
|
||||||
import { inviteSchema } from '../../lib/validate'
|
import { inviteSchema } from '../../lib/validate'
|
||||||
import { SSR } from '../../lib/constants'
|
import { SSR } from '../../lib/constants'
|
||||||
|
import { getGetServerSideProps } from '../../api/ssrApollo'
|
||||||
|
|
||||||
|
// force SSR to include CSP nonces
|
||||||
|
export const getServerSideProps = getGetServerSideProps({ query: null })
|
||||||
|
|
||||||
function InviteForm () {
|
function InviteForm () {
|
||||||
const [createInvite] = useMutation(
|
const [createInvite] = useMutation(
|
||||||
|
@ -5,6 +5,10 @@ import { CenterLayout } from '../../components/layout'
|
|||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { INVOICE } from '../../fragments/wallet'
|
import { INVOICE } from '../../fragments/wallet'
|
||||||
import { SSR } from '../../lib/constants'
|
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 () {
|
export default function FullInvoice () {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
@ -3,6 +3,10 @@ import { CenterLayout } from '../components/layout'
|
|||||||
import Snl from '../components/snl'
|
import Snl from '../components/snl'
|
||||||
import { gql } from 'graphql-tag'
|
import { gql } from 'graphql-tag'
|
||||||
import { useMutation, useQuery } from '@apollo/client'
|
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 () {
|
export default function Index () {
|
||||||
const [toggle] = useMutation(
|
const [toggle] = useMutation(
|
||||||
|
@ -15,6 +15,10 @@ import { useToast } from '../../components/toast'
|
|||||||
import { gql } from 'graphql-tag'
|
import { gql } from 'graphql-tag'
|
||||||
import { useShowModal } from '../../components/modal'
|
import { useShowModal } from '../../components/modal'
|
||||||
import { DeleteConfirm } from '../../components/delete'
|
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 () {
|
export default function Withdrawl () {
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user