Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS Proxy #243

Open
AndyMBridges opened this issue Sep 26, 2017 · 1 comment
Open

CORS Proxy #243

AndyMBridges opened this issue Sep 26, 2017 · 1 comment

Comments

@AndyMBridges
Copy link

Hi Guys,

I'm having a CORS issue when pulling the flickr api using http.get.

(http://api.flickr.com/services/feeds/photos_public.gne)

Can someone please tell me how to integrate a proxy to bypass this? Would it be within the gulp file or the webpack setup?

Thanks,
Andy

@samithaf
Copy link
Contributor

Hey,

You can add extra middleware to browser sync server.

`import proxy from 'http-proxy-middleware'; // see how to use here https://github.com/chimurai/http-proxy-middleware`

middleware: [
proxy(`http://api.flickr.com/services/`, assign({}, proxyConfig)),
]
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants