-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie session related middleware interferes #250
Comments
styliii
changed the title
Cookie related middleware interferes
Cookie session related middleware interferes
Feb 1, 2023
@styliii I don't think this is related to Rack::CORS. Take a look at this: I'm guessing you're not running behind nginx, but something is not lining up in either how you're testing, or in your app setup. |
Thanks for taking a look. I'm able to isolate it to a couple of line changes in my
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason, when I add cookie related middleware (specifically
ActionDispatch::Session::Cookie
), therack-cors
gem stops working. I'll get theActionController::InvalidAuthenticityToken (HTTP Origin header (http://localhost:3000) didn't match request.base_url (http://localhost:3001)):
error. Once I remove the cookie related middleware, everything starts working again. Any ideas? I've tried movingActionDispatch::Cookies
andActionDispatch::Session::CookieStore
aboveRack::Cors
, but that didn't work either.Here's my
bundle exec rake middleware
output:My request
The text was updated successfully, but these errors were encountered: