There are some elements in our application that work with ajax. We offer users to embed parts of the application in an iframe.
Everything works fine in Chrome and Mozilla. In Safari, we get error 422, and the server log looks like this:
2015-07-15T08:26:06.818885+00:00 app[web.1]: Completed 422 Unprocessable Entity in 4ms 2015-07-15T08:26:06.815411+00:00 app[web.1]: Can't verify CSRF token authenticity 2015-07-15T08:26:06.823389+00:00 app[web.1]: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
We found that if we directly access the iframe AND THEN URL, which contains the iframe, it is working fine, which may indicate that it is associated with cookies.
I tried this solution , but we still have this problem.
source share