remy/jsbin — pull request #914 by joefiorini (2013-11-11 03:10:39+00:00)
Title: Support proxying over a port

When proxying a local jsbin instance via another server running on port 80 a CORS error arises when trying to do a `history.replaceState` with `jsbin.getURL()`. The problem is that `jsbin.root` has the port appended to it, but I want all requests to go through the configured host _without the port_.

This commit allows setting JSBIN_PROXY_HOST to keep the port from being appeded to the host. That way jsbin.root is just `jsbin.dev` not `jsbin.dev:PORT`, but the server still runs on the passed in port.

I didn't have time to dig into how to make this a setting in the config file. Is that pretty easy to add?