By andschwa
Connected Tutorial(This question is a follow-up to this tutorial):
How To Deploy a Static Website to the Cloud with DigitalOcean App PlatformHow 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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Is there no way to modify headers for a static site on your platform?
We need to modify Content-Security-Policy settings to pass a required security review. Any insights would be appreciated.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.