cyu / rack-cors

Rack Middleware for handling Cross-Origin Resource Sharing (CORS), which makes cross-origin AJAX possible.
MIT License
3.26k stars 263 forks source link

pre-flight requests disconnect me from my application (non-rails) #179

Closed BuonOmo closed 4 years ago

BuonOmo commented 5 years ago

When I do a post CORS request (using axios). The OPTION request doesn't send session information. The issue I encounter is that after OPTION has been made, my Rack application looses track of the session and my user end up disconnected. Does it ring any bell?

I've been searching a lot for this issue. And I encountered a few topic discussing about the fact that it is not axios role to send cookie over an OPTION pre-flight request (for instance in this discussion. It should be the server that takes care of it.

cyu commented 4 years ago

I'm closing this issue because there hasn't been any activity on this issue in a while. Having said that, I do believe this has been correct in newer releases that returns OPTIONS without delegating to the app.