Does anyone know how to get netlify to return Retry-After headers on a “website under maintenance” page? (reference) My netlify.toml file contains this:
[[redirects]]
from = "/*"
to = "index.html"
status = 503
force = true
headers = {Retry-After = 600}
It correctly sends 503 headers for all requested paths, but the Retry-After header is missing.
I also tried this, which didn’t work:
[[redirects]]
from = "/*"
to = "index.html"
status = 503
force = true
[redirects.headers]
Retry-After = 600
Both versions produce the headers below. I think (hope) that the X-Robots-Tag: noindex header is there only because I’m hitting a staging server (using netlify deploy instead of netlify deploy --prod).
$ curl -I https://some-subdomain.netlify.com/
HTTP/1.1 503 Service Unavailable
Cache-Control: public, max-age=0, must-revalidate
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Fri, 09 Nov 2018 22:37:21 GMT
Etag: "<some-etag>"
X-Robots-Tag: noindex
Age: 0
Connection: keep-alive
Server: Netlify
X-NF-Request-ID: <some-id>