Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 615 Bytes

README.md

File metadata and controls

42 lines (26 loc) · 615 Bytes

CORS

See companion blogpost here: https://medium.com/@valgaze/utility-post-cors-json-p-proxy-servers-and-the-same-origin-policy-7233dec2d26c#.wcmnhsnyo

Proxy server example

$ npm run proxy

Then in a browser access: http://localhost:3000/proxy/4


JSONP example

$ npm run jsonp

Then in a browser access: http://localhost:3000/


CORS example

You need to turn on two servers for this example:

Turn on API server

$ npm run cors_server

Turn on Frontend

$ npm run cors_frontend

Then in a browser access: http://localhost:3001/