Update /healthcheck to not make HEAD requests against /
Context for reviewers
Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.
The resource route/healthcheck was making a HEAD / request to test that the page is able to load. This was having some negative side effects:
We were getting a lot of extra HEAD and GET requests in our logs
Trying to access /healthcheck from outside a development docker container returned 500s
Once we started creating database records for loading /, the healthcheck started to create a new db record each time:
Redirecting to baseUrl /gallatin/recertify
HEAD / 302 - - 10.347 ms
Generating fa40c28e-86ac-401c-8bf7-346f073c7415
Creating Submission record in database for fa40c28e-86ac-401c-8bf7-346f073c7415 and agency gallatin
HEAD /gallatin/recertify 200 - - 18.807 ms
GET /healthcheck 200 - - 57.973 ms
Testing
Screenshots, GIF demos, code examples or output to help show the changes working as expected. ProTip: you can drag and drop or paste images into this textbox.
Ticket
Changes
Context for reviewers
The resource route
/healthcheck
was making aHEAD /
request to test that the page is able to load. This was having some negative side effects:HEAD
andGET
requests in our logs/healthcheck
from outside a development docker container returned 500s/
, the healthcheck started to create a new db record each time:Testing
npm run dev
)localhost:3000/healthcheck
in your browserGET /healthcheck 200
Do this again from inside the docker container:
docker compose up -d --build && docker compose logs -f remix_dev
localhost:3003/healthcheck