Question

How do I add custom HTTP headers to a hosted static site?

Connected Tutorial
This question is a follow-up to this tutorial:

How do I setup Digital Ocean’s static sites with custom headers, like “Referrer-Policy”?

Netlify let’s you set custom headers for static sites by adding to their TOML file:

[[headers]]
  for = "/*"
  [headers.values]
    Referrer-Policy = "no-referrer"
    X-Content-Type-Options = "nosniff"
    X-Frame-Options = "deny"
    X-XSS-Protection = "1; mode=block"

What’s the equivalent for an app spec on Digital Ocean?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks for the question. This functionality isn’t currently available for static sites components in the App Platform. We’ll consider this as a feature. Service type components can set any headers as they respond to requests.