Files
fn-serverless/api/server
Alexander Bransby-Sharples c5ec0cc41e Add CORS support to fn api (#455)
The Gin middleware is being used if one or more Origins are specified. Default setup for each Origin is as follows:

- GET,POST, PUT, HEAD methods allowed
- Credentials share disabled
- Preflight requests cached for 12 hours

Which are the defaults gin-contrib/cors comes with out of the box.

Gin-cors will return a 403 if it gets a request with an Origin header that isn't on its' list. If no Origin header is specified then it will just return the servers response.

Start fn with CORS enabled:

`API_CORS="http://localhost:4000, http://localhost:3000" make run`
2017-11-16 15:37:26 +00:00
..
2017-07-31 21:14:11 +03:00
2017-09-12 20:09:22 +03:00
2017-07-31 21:14:11 +03:00
2017-07-31 21:14:11 +03:00
2017-07-31 21:14:11 +03:00
2017-07-19 13:44:26 -07:00
2017-09-11 11:16:17 -07:00
2017-07-31 21:14:11 +03:00
2017-10-25 14:13:26 +02:00
2017-09-11 23:38:19 +03:00
2017-11-16 15:37:26 +00:00
2016-12-29 20:19:42 +01:00
2017-07-31 21:14:11 +03:00