Debugging returned headers (Apple https issue)

Is there any way to log for debugging purposes what headers are being returned by Caddy?

I am looking to diagnose an old unresolved problem. I have one site which will not display at all on any Apple device (iOS or MacOS) when sent over https; it’s OK over http, and OK over both in Windows and Android. At present I can’t think of anything to look for other than an unexpected combination of headers that Apple doesn’t like. The site is generated by Grav (a CMS).

Sort of.

As of 0.10.11 you can log response headers, the only gotcha is that you need to know the header name, you cant simply log out all headers.

log / mylogfile.log "{common} {<HeaderName}"

If you have some idea what header may be being returned and wish to get you values, this will do it.

1 Like

Thanks. I subsequently discovered that the developer tools in any browser can show the headers, which enabled me to fix the problem (a header that shouldn’t have been there at all).

I can’t now put the fix in the right thread. The problem turned out to be that for whatever reason Grav was including a “connection: close” header, which is not valid in HTTP/2. Deleting this header in the Caddy configuration for the Grav site has enabled it to be displayed normally on Apple devices. There may be a Grav configuration item that would also fix it, but I haven’t discovered it yet.


If you’d like, write out the reply you would have posted in the previous thread, post it in this one, and I will move it into the locked thread and mark it as the solution.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.