Commit Graph

6 Commits

Author SHA1 Message Date
Frank Winter 0b36126854 Change DELETE request for projects Fixes #1165 (#1172)
* Change DELETE request for projects

* fixes #1165, by updating requestsOfType to check for null or undefined values

* remove unnecessary whitespace changes
2019-10-02 16:18:54 -04:00
Andrew Nicolaou 7fdd970a43 Fixes bug where requestsOfType() would fail if no body
- Passes if request has no body
- Returns a JSON object with an error message when request
  doesn't match type, the response body was "[object Object]"
2019-07-22 15:03:31 -04:00
Cassie Tarakajian 3307613aec
adds slugify feature for #522 (#523) 2018-02-07 16:00:09 -05:00
Francis Li 82ca755362 Fixes #489, only logs request in development (#490) 2017-12-08 14:50:53 -05:00
Cassie Tarakajian 03eae2f1ef fixes #479 and fixes #449 2017-11-28 14:48:50 -05:00
Andrew Nicolaou 6cbc376d6e CSRF/XSS protection (#374)
* /api endpoints only allows requests with application/json Content-Type

Otherwise sends 406 Unacceptable

* Uses CSRF token

The CSRF token is sent as the cookie 'XSRF-TOKEN' on all HTML page
requests. This token is  picked up automatically by axios
and sent to the API with all requests as an 'X-XSRF-TOKEN' header.
The middleware runs on all routes and verifies that the token matches
what's stored in the session.
2017-06-26 13:58:58 -04:00