Question: Using csurf with react-server


Using csurf with react-server

Answers 0
Added at 2017-01-04 14:01

I would like to add csurf as an express middleware inside the react-server for a universal app.

What I want to achieve is adding the csrf token to a hidden input in a form in the react component to maintain the same csrf protection flow a server-rendered website would provide, but within a SPA.

Is this technically possible within the react-server? If so, how can I pass the csrf token that is available in the response object to the react component via the page (ideally)?

Answers to

Using csurf with react-server

Source Show
◀ Wstecz