Closed winston0410 closed 1 year ago
Happened to me and turns out it was my Mac's Airplay Receiver (after Monterrey update) hijacking port 5000, so my app requests were hitting the Mac and of course, no CORS was configured there.
You can disable in System Preferences -> Sharing -> AirPlay Receiver.
More info here: https://developer.apple.com/forums/thread/682332
This is happening for me too. cors version 1.1.1
origin ENV['URL']
but, when the resource is hit, Access-Control-Allow-Origin header is not returned. Am i missing anything here?
@cyu I'm also facing the same issue. Can we fix this issue on priority?
I'm closing this issue – there's not enough information to go on from information provided by @winston0410 @swathi-ally and @MuhammadRazaAslam
Make sure you're providing an Origin
header when testing – the middleware doesn't do anything unless that is provided.
I have following codes in
config/initializers/cors.rb
:And when I try to do a request, I cannot see the
Access-Control-Allow-Origin
header in the response. I am using the latest rack-cors.