Add HEAD routes to avoid spurious error messages #1715

Closed
opened 2026-04-06 02:16:49 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jjlin on 3/5/2023

Rocket automatically implements a HEAD route when there's a matching GET route, but relying on this behavior also means a spurious error gets logged due to https://github.com/SergioBenitez/Rocket/issues/1098.

Add explicit HEAD routes for / and /alive to prevent uptime monitoring services from generating error messages like No matching routes for HEAD /. With these new routes, HEAD / only checks that the server can respond over the network, while HEAD /alive also checks that the database connection is alive, similar to GET /alive.

*Originally created by @jjlin on 3/5/2023* Rocket automatically implements a HEAD route when there's a matching GET route, but relying on this behavior also means a spurious error gets logged due to <https://github.com/SergioBenitez/Rocket/issues/1098>. Add explicit HEAD routes for `/` and `/alive` to prevent uptime monitoring services from generating error messages like `No matching routes for HEAD /`. With these new routes, `HEAD /` only checks that the server can respond over the network, while `HEAD /alive` also checks that the database connection is alive, similar to `GET /alive`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1715