What are you trying to do?
We use New Relic for monitoring our applications. I noticed that HEAD request to our application fails. What is the easiest path in supporting HEAD request. My understanding is that express supports HEAD by means of GET but maybe with this package, we have to be more explicit
Ask your question
How do we support HEAD request to the root of our application. Do we simply add logic to one of our middlewares to check if the method request is HEAD:
ctx.method.toLowerCase() === 'head' ? 200 : false
Returning 200 when request method is HEAD otherwise false which would move on to other middleware.
Wanted to double check if this was the easiest solution to this problem.
What are you trying to do? We use New Relic for monitoring our applications. I noticed that HEAD request to our application fails. What is the easiest path in supporting HEAD request. My understanding is that express supports HEAD by means of GET but maybe with this package, we have to be more explicit
Ask your question How do we support HEAD request to the root of our application. Do we simply add logic to one of our middlewares to check if the method request is HEAD:
Returning 200 when request method is HEAD otherwise false which would move on to other middleware.
Wanted to double check if this was the easiest solution to this problem.