I would like to modify the response headers for 404 pages. Specifically, to change the content-type
of the 404 to “application/json”.
Here’s the regular, 200-served content: https://afoot-lists.netlify.app/phonetic
I would like the 404 to follow suit: https://afoot-lists.netlify.app/fourohhour , but it serves text/html
no matter what config I try. Is this even possible to configure?
From my netlify.toml
file:
[[headers]]
for = "/lists/*"
[headers.values]
content-type = "application/json"
Access-Control-Allow-Origin= "*"
[[redirects]]
from = "/:endpoint"
to = "/lists/:endpoint.json"
status = 200