[PR #3307] [MERGED] Add HEAD routes to avoid spurious error messages #3264

Closed
opened 2026-03-03 09:42:10 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/3307
Author: @jjlin
Created: 3/5/2023
Status: Merged
Merged: 3/6/2023
Merged by: @dani-garcia

Base: mainHead: head-routes


📝 Commits (1)

  • d3626eb Add HEAD routes to avoid spurious error messages

📊 Changes

1 file changed (+21 additions, -3 deletions)

View changed files

📝 src/api/web.rs (+21 -3)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/3307 **Author:** [@jjlin](https://github.com/jjlin) **Created:** 3/5/2023 **Status:** ✅ Merged **Merged:** 3/6/2023 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `head-routes` --- ### 📝 Commits (1) - [`d3626eb`](https://github.com/dani-garcia/vaultwarden/commit/d3626eba2abc6c76959535231b4f93a14e85dc63) Add HEAD routes to avoid spurious error messages ### 📊 Changes **1 file changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/api/web.rs` (+21 -3) </details> ### 📄 Description 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`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 09:42:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#3264
No description provided.