Skip to content
Discussion options

You must be logged in to vote

Hey @hdodov — we just looked into this in-depth and I have some explanations for you as well as a potential solution.

In production, we are simply leveraging express.static to serve static files. The Accept header is necessary to be able to consume html, etc. from a server response, and being that your health check request does not specify it, Express does not return with any results - thus 404.

This is not something that Payload can control, and further, express.static does not have any options for how to treat the Accept header.

Instead, what you could do would be to point your health check to a custom route that you've opened, like /health-check and have your route return a 200.

Either…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hdodov
Comment options

Answer selected by hdodov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
3 participants
Converted from issue

This discussion was converted from issue #1677 on December 19, 2022 19:03.