Browse Source
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`.pull/3307/head
Jeremy Lin
2 years ago
1 changed files with 21 additions and 3 deletions
Loading…
Reference in new issue