How to handle favicon.ico?

How do you handle favicon.ico that as error 403 if I wanted to let user know there isn’t any favicon. When header -Server directive was apply to the

:9090 {
header -Server

}

Only favicon.ico reveal “Caddy” in Google Chrome network tab although I do not have a favicon.ico in my assets.

Does Caddy configuration does not apply to favicon.ico?

You’ll need to remove the server inside of a handle_errors block as well. When a handler encounters an error (in this case, file not found), then it takes a different execution path that avoids other handlers, including response header modification.

I must ask though, what do you hope to gain from obfuscating that header? It has no security benefit to do so.

Hmm, maybe SpaceX has that answer, but I don’t work there.

waitwhat

This topic was automatically closed after 30 days. New replies are no longer allowed.