Skip to content

Instantly share code, notes, and snippets.

@ZakKa89
Created June 7, 2019 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZakKa89/e7a50b35977966672dfb71e1075dcc40 to your computer and use it in GitHub Desktop.
Save ZakKa89/e7a50b35977966672dfb71e1075dcc40 to your computer and use it in GitHub Desktop.
Express localhost CORS proxy
var proxy = require('express-http-proxy');
var app = require('express')();
var cors = require('cors');
app.use(cors());
app.use('/proxy', proxy('https://api1-yfo.eq2.triple-it.nl/'));
app.listen(3002, () => console.log(`Example app listening on port ${3002}!`));
// use this to solve CORS-problems from localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment