Commit 9bf50c5d authored by Lukas Eipert's avatar Lukas Eipert

Disable usage of csrf token in Rails

Rails UJS `.csrfToken` doesn't seem to overrideable. As it uses the same
methodlogy under the hood, we do not need to cache the CSRF token:

https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs/utils/csrf.coffee#L5-L8
parent e605e6f0
import Rails from '@rails/ujs';
import csrf from './csrf';
export const initRails = () => {
// eslint-disable-next-line no-underscore-dangle
......@@ -18,7 +17,4 @@ export const initRails = () => {
}
};
// use our cached token for any Rails-generated AJAX requests
Rails.csrfToken = () => csrf.token;
export { Rails };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment