Created
June 7, 2019 08:28
-
-
Save ZakKa89/e7a50b35977966672dfb71e1075dcc40 to your computer and use it in GitHub Desktop.
Express localhost CORS proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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