In my project, I utilized the custom headers from Hugo docs. However, no code appears to have been uploaded to the webpage. Is the code below supposed to add an html element to the head, or is it just for netlify-style hosting?
Now I see where my uncertainty stemmed from. The CSP only affects the Hugo server and does not export any configuration files such as .htaccess. Keeping the header setting in the Hugo setup is quite convenient. Can I create an .htaccess file from layouts in the same way that I can a sitemap and a robot.txt file? Is there an existing example of such a layout that I could use as a starting point?
Thank you once more for taking the time to read and help.
I can add that the server config syntax closely mimics Netlify’s. You get some duplication, but you at least remove some of the surprises in this area when you go from dev to “production” and suddenly see lots of CSP errors etc. in the browser.