You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is that I didn't want to set the csrf token globally for all the requests because there are some requests that are external to other services (and need to be in the Angular app, not the Rails backend).
So instead of setting the default headers for all request, I created an interceptor that checks if the request is going to the local API, and only sets the csrf token for those specific requests.
Anyway, I wanted to say thank you for sharing your code which helped figure out what I needed to do.
And I'm sharing this here just in case anyone is trying to solve the same problem.
The text was updated successfully, but these errors were encountered:
Hey,
this is not an issue as much as it is a thank you!
I was able to use the code from your gem to do the following in my app:
The idea is that I didn't want to set the csrf token globally for all the requests because there are some requests that are external to other services (and need to be in the Angular app, not the Rails backend).
So instead of setting the default headers for all request, I created an interceptor that checks if the request is going to the local API, and only sets the csrf token for those specific requests.
Anyway, I wanted to say thank you for sharing your code which helped figure out what I needed to do.
And I'm sharing this here just in case anyone is trying to solve the same problem.
The text was updated successfully, but these errors were encountered: