kodadot/nft-gallery

View on GitHub
netlify.toml

Summary

Maintainability
Test Coverage
[build.environment]
  NODE_VERSION = "20"

[build]
  # This will be your default build command.
  command = "pnpm run generate"
  # This is the directory that you are publishing from.
  publish = "dist"

[functions]
  node_bundler = "esbuild"

[dev]
   command = "npx pnpm dev"
   port = 9000
   targetPort = 9090

[context.deploy-preview]
command = 'export BASE_URL=$DEPLOY_PRIME_URL && env && pnpm run generate'

[context.production]
command = 'export BASE_URL=$URL && env && pnpm run generate'

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

[[headers]]
  for = "/*"
  [headers.values]
    X-Frame-Options = "DENY"
    X-XSS-Protection = "1; mode=block"
    # Referrer Policy is a new header that allows a site to control how much information the browser includes with navigations away from a document and should be set by all sites.
    Referrer-Policy = "strict-origin-when-cross-origin"
    # Don't load any resource type not explicitly enabled
    # Disable plugins like Flash or Silverlight
    # Load images, scripts, stylesheets and fonts from self
    ## Content-Security-Policy = "upgrade-insecure-requests" <- this did not work tho
    # Prevent browsers from incorrectly detecting non-scripts as scripts
    X-Content-Type-Options = "nosniff"
    # Block site from being framed with X-Frame-Options and CSP
    Content-Security-Policy = "frame-ancestors 'self';"
    # Basic one if one above won't work
    # Content-Security-Policy = "default-src 'self';"
    # For future testing, refer to https://github.com/kodadot/nft-gallery/issues/540
    # Permissions-Policy = "interest-cohort=()"