HEAD request conversion

Hi, I can’t seem to work this out on my own and need some advice here:

I deployed a serverless REST API that uses Swagger UI.
It works as expected, with the exception of the HEAD requests, as these seem to be automatically converted to GET requests by Netlify.

Is there any way to disable this or to work around this issue?

Please let me know, if you need more information.
Thanks in advance

Howdy @AnnDG and welcome to the community! :cowboy_hat_face:

We convert all HEAD requests as GET internally as part of our edge routing, and drop the body in the process. There isn’t a way to disable this behavior.

Could you share a bit more about your use-case and why that can only be achieved with HEAD and not GET requests so that we may better advise you?

Thanks for the quick reply @audrey!

I’m using the HEAD request to check whether or not a feature is enabled or disabled by sending a dedicated status code back.

I guess, I found a solution for my issue:
I’m now sending a custom header param with the HEAD request and check if it is present and handle this case differently from a GET request.