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

Proxy target supports local file path #63

599316527 opened this issue Apr 6, 2016 · 2 comments


None yet
3 participants
Copy link

commented Apr 6, 2016

I write some local mockup files to debug APIs when server-side is not ready.
It will be nice to write file path in target to proxy local file.

proxyMiddleware('/login/verify', {
    target: 'file:///home/someone/mockup',
    pathRewrite: {
      '^/login/verify': 'login-verify.json'

@chimurai chimurai added the question label Apr 6, 2016


This comment has been minimized.

Copy link

commented Apr 6, 2016

imho, this would create unnecessary bloat in the proxy middleware for a specific use-case.

Think it is better to start a separate server to serve your static .json files, configure the proxy target and point it to this server.

This way you can customise your setup to your needs.

@chimurai chimurai closed this Apr 6, 2016

@chimurai chimurai added the wontfix label Apr 6, 2016


This comment has been minimized.

Copy link

commented Feb 23, 2018

Actually, I would also like this feature for my own project. Being able to serve local files for certain routes in a development environment is important for most Javascript projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.