Forward certain requests to another server

Is it possible to send, say, all requests to /rest/* to another development server running on the same machine - i.e. from localhost:4567 to localhost:8000? I’m hitting CORS problems that I normally wouldn’t hit in production (when both my static middleman site and my dynamic REST service will both be running on the same domain on port 80).

Has anyone built an extension that already does that?

Not sure about a extension but there are two good browser plugins to allow CORS for development (just don’t go surfing around with them turned on)

https://addons.mozilla.org/en-US/firefox/addon/forcecors/
https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi
OR
https://developer.chrome.com/extensions/xhr.html