Skip to content

Instantly share code, notes, and snippets.

@MaxMEllon
Created July 30, 2020 19:24
Show Gist options
  • Select an option

  • Save MaxMEllon/1ffcdeef6ffc8b1384b0ffae7b89df34 to your computer and use it in GitHub Desktop.

Select an option

Save MaxMEllon/1ffcdeef6ffc8b1384b0ffae7b89df34 to your computer and use it in GitHub Desktop.
app.prepare().then(() => {
server.get('*', (req, res) => {
req.nonce = crypto.randomBytes(2).toString('base64')
res.setHeader('Content-Security-Policy', '割愛')
handle(req, res)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment