bripkens / connect-history-api-fallback

Fallback to index.html for applications that are using the HTML 5 history API
MIT License
1.83k stars 143 forks source link

Allow HEAD requests (Fixes #72) #73

Closed dsinni closed 2 years ago

dsinni commented 4 years ago

This proposal handles HEAD requests similarly to GET requests, since they are essentially the same with the difference of HEAD response not containing a body.

If special handing for HEAD requests is needed, that can be set explicitly in express routing or otherwise.

bripkens commented 4 years ago

Hey @dsinni,

thank you for the PR! Could you please also add test cases for this and extend the changelog?

dsinni commented 4 years ago

@bripkens Sure, I'll have to circle back, though. Kind of under the gun on some other projects.

For the record, I'm using this fix in a fork and including in my project. Appears to be doing the trick.

awwit commented 2 years ago

@dsinni can you please add tests? )

I really need your fix.