CORS with Play and ReactJs

(Pramesh) #1

i’m using reactjs for frontend and play for backend. While sending post request after filling from from reactjs, I need to send corsToken. I am not able to figure out how to handle cors when using react and play.
can anyone help me.

Thanks in advance!!!

(Patrick Li) #2

We have something just like this. On the backend, make sure you have the CORS filter enabled. The default settings should work, but you can customize it to lock things down.

On the frontend with react, we use axois, so every “form submit” is an API call.

(Christian Kaps) #4

@pramesh Do you mean CSRF token? It’s not the same as CORS.

Anyway, I would like to throw in an example application that uses Play and React:

(Pramesh) #5

@akkie Thank you for the info. Actually I’m just starting with these things and got mixed up. I’ll go through the mentioned repo :slight_smile: