+1 to you both. Having the same issue. My temporary fix was to turn off CSRF protection. I think a bug report might make sense for health checks that can’t have headers in the request. Maybe it’s just a documentation improvement (on how to implement a health check that tests that the GraphQL parts are working.
I can create an issue if the two of you haven’t figured out another way around this.
Appreciate the tip. It took me a bit of scratching my head (and just asking ChatGPT) to recognize that this snippet of code had to be executed before app.use(), otherwise Apollo’s CSRF rule will still affect the outcome.