Netlify set customer headers
On some routes of your squido website, you may need to set certain headers for certain routes/URL's. For instance the /rss
URL would need the Content-Type
header set to application/xml
.
Luckily services like Netlify this is easily done.
- Create a text file named
_headers
in the root of your/source
directory - In this file set the following:
/rss
Content-Type: application/xml
The
/rss
is the route andContent-Type: application/xml
is the header you want to set. You can adding multiple headers by adding a new line belowContent-Type
.
- You can then re-deploy your website on Netlify.
- You can then check verify using Postman:
Thats it. You can read about more options on the Netlify website: https://docs.netlify.com/routing/headers/