For CORS middleware, why is HEAD not included in ALL_METHODS?

I recently added a HEAD method to my project, and it worked well via curl (and TestClient and SwaggerUI etc.) But it won’t work with React App that uses fetch.

When debugged, we realized that default Access-Control-Allow-Methods does not include HEAD
(The fix was really easy - add HEAD to allow_methods param)

Interestingly, this initial code included HEAD - but I suppose it was dropped along the way.

What was the logic behind this ?

If this is just a bug - I can submit a one line PR :slight_smile:

1 Like

I had the same problem, cost me a bit of time debugging.