Skip to content
Snippets Groups Projects
Select Git revision
  • d53b95bd5bc51bcfbbaa8ed3dcd0c7d0397ee4d0
  • main default protected
2 results

netlify.toml

Blame
  • Antoine's avatar
    Antoine Roy authored
    2ed0fcf6
    History
    netlify.toml 1.54 KiB
    [build]
      publish = "public"
      functions = "functions"
    
    [build.environment]
      NODE_VERSION = "18.12.1"
      NPM_VERSION = "8.19.2"
    
    [context.production]
      command = "pnpm build"
    
    [context.deploy-preview]
      command = "pnpm build -- -b $DEPLOY_PRIME_URL"
    
    [context.branch-deploy]
      command = "pnpm build -- -b $DEPLOY_PRIME_URL"
    
    [context.next]
      command = "pnpm build"
    
    [context.next.environment]
      HUGO_ENV = "next"
    
    [dev]
      framework = "#custom"
      command = "pnpm dev"
      targetPort = 1313
      port = 8888
      publish = "public"
      autoLaunch = false
    
    # Redirects and rewrites — https://docs.netlify.com/routing/redirects/#syntax-for-the-netlify-configuration-file
    
    # Custom headers — https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file
    [[headers]]
      for = "/*"
      [headers.values]
        Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options = "nosniff"
        X-XSS-Protection = "1; mode=block"
        Content-Security-Policy = "default-src 'self'; manifest-src 'self'; connect-src 'self'; font-src 'self'; img-src 'self' https://avatars.githubusercontent.com data:; script-src 'self' 'nonce-dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk='; style-src 'self'"
        X-Frame-Options = "SAMEORIGIN"
        Referrer-Policy = "strict-origin"
        Permissions-Policy = "geolocation=(self), microphone=(), camera=()"
        Cache-Control= '''
        public,
        max-age=31536000'''
        Access-Control-Allow-Origin = "*"