Response-Header per _headers-Datei setzen
Über eine _headers-Datei im Publish-Verzeichnis lassen sich jetzt Response-Header pro Pfad setzen, die auf Produktions-URLs, Branch-Previews und eigenen Domains gelten, wobei unbrauchbare Zeilen übersprungen und im Build-Log genannt werden und das Format dem von Netlify und Cloudflare Pages entspricht.
You can now set response headers per path on your site: a Content-Security-Policy on /*, CORS on an API folder, a year-long cache on your own fonts. Add a _headers file to your publish directory with a path pattern on one line and the headers indented below it, and the rules apply on production URLs, branch previews and custom domains from your next deploy. A line that cannot be used is skipped and named in your build log, so a typo never fails a deploy. Preview URLs stay hidden from search engines whatever the file says. The format is the one Netlify and Cloudflare Pages use, so an existing file moves over unchanged.