Skip to content

Inline script not loading #302

Answered by mohdlatif
mohdlatif asked this question in Q&A
Nov 25, 2023 · 4 comments · 14 replies
Discussion options

You must be logged in to vote

Yeb, it worked, this is my config.

  security: {
    nonce: true,
    ssg: {
      hashScripts: true, // In the SSG case, inline scripts generated by the server will be allowed by hash
      hashStyles: false, // Disables CSP hash support for styles in SSG mode (recommended)
    },
    //https://nuxt-security.vercel.app/documentation/advanced/strict-csp
    headers: {
      contentSecurityPolicy: {
        "img-src": [
          "'self'",
          "data:",
          "https://res.cloudinary.com",
      
        ],
        "script-src": [
          "'self'",
          "'nonce-{{nonce}}'",
          "https://static.cdn.prismic.io",
          "https://domain.prismic.io",
        ],
        "…

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
14 replies
@mohdlatif
Comment options

@vejja
Comment options

@Baroshem
Comment options

@mohdlatif
Comment options

Answer selected by Baroshem
@Baroshem
Comment options

@Baroshem
Comment options

@vejja
Comment options

@mohdlatif
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants