Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveTokenToHeaderForRequests ¶
MoveTokenToHeaderForRequests handles the case where someone sends a JSON body as form values to the request api (at /request). It extracts a '_token' JSON field and puts it into the X-CSRF-Token header instead.
This is needed because our old android app uses this to communicate with the request api, this was apparently a laravel feature where Form.Get (Input::get) style API also read the request body if it was JSON.
Types ¶
Click to show internal directories.
Click to hide internal directories.