###
# BUILD
###
[build]
  command = "npm run build"
  publish = "_site"
  edge_functions = "api"

###
# IMAGES
###
[images]
  remote_images = ["https://f001.backblazeb2.com/file/coryd-dev/.*", "https://books.google.com/.*"]

###
# URLs
###
[build.processing.html]
  pretty_urls = true

###
# HEADERS
###
[[headers]]
  for = "/media/*"
  [headers.values]
    Cache-Control = "public, max-age=15552000, must-revalidate"

[[headers]]
for = "/feeds/posts"
  [headers.values]
  Content-Type = "application/xml; charset=utf-8"
  x-content-type-options = "nosniff"

[[headers]]
for = "/feeds/links"
  [headers.values]
  Content-Type = "application/xml; charset=utf-8"
  x-content-type-options = "nosniff"

[[headers]]
for = "/feeds/books"
  [headers.values]
  Content-Type = "application/xml; charset=utf-8"
  x-content-type-options = "nosniff"

[[headers]]
for = "/.well-known/webfinger"
  [headers.values]
  Content-Type = "application/jrd+json; charset=utf-8"

[[headers]]
for = "/.well-known/gpc.json"
  [headers.values]
  Content-Type = "application/jrd+json; charset=utf-8"

[[headers]]
for = "/.well-known/traffic-advice"
  [headers.values]
  Content-Type = "application/trafficadvice+json"

[[headers]]
for = "/contribute.json"
  [headers.values]
  Content-Type = "application/json"

[[headers]]
for = "/api/now-playing"
  [headers.values]
  Content-Type = "application/json"

[[headers]]
for = "/api/search"
  [headers.values]
  Content-Type = "application/json"

[[headers]]
for = "/blogroll.opml"
  [headers.values]
  Content-Disposition = "attachment; filename=cory-dransfeldt-blogroll.opml"

[[headers]]
  for = "/*"
  [headers.values]
  Content-Security-Policy = "upgrade-insecure-requests; block-all-mixed-content;"
  X-Frame-Options = "DENY"
  X-XSS-Protection = "1; mode=block"
  Referrer-Policy = "strict-origin-when-cross-origin, no-referrer-when-downgrade"
  Permissions-Policy = "autoplay=(), camera=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=()"