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

Updating the upgrading doc #892

Merged
merged 1 commit into from Oct 18, 2015
Merged

Updating the upgrading doc #892

merged 1 commit into from Oct 18, 2015

Conversation

donasaur
Copy link
Contributor

Recently ran into a case where I had to upgrade the http-proxy version for an app, and that app was using a proxy table.

I'm not sure how many users are still using the 0.x.x version of http-proxy, but the added link (found from one of the GH issues) may encourage them to switch over to 1.x.x if they were using the old version due to its proxy table support and the activation energy to upgrade was too high.

Edit: There was some work involved in creating a proxy table to map paths to urls, disregarding the source's hostname, so I'm not sure if this would warrant creating a module (w/ source hostname support). Here's the relevant code if you also want to add it to the README:

    for (var pathPrefix in proxyTable) {
        if (proxyTable.hasOwnProperty(pathPrefix)) {
            if (path.indexOf(pathPrefix) === 0) {
                req.url = path.replace(pathPrefix, '');
                target = proxyTable[pathPrefix]; // this is the reverse proxy target
                break;
            }
        }
    }

Recently ran into a case where I had to upgrade the `http-proxy` version for an app, and that app was using a proxy table.

I'm not sure how many users are still using the 0.x.x version of `http-proxy`, but the added link (found from one of the GH issues) may encourage them to switch over to 1.x.x if they were using the old version due to its proxy table support and the activation energy to upgrade was too high.

I might release a module for this eventually, lol, since there was some work involved in creating a proxy table to map paths to paths for the same hostname.
@jcrugzz
Copy link
Contributor

jcrugzz commented Oct 18, 2015

@donasaur yea a its been on my list to make a module to replicate some of the features that were lost in the 1.0.0 simplication so if you decide to write one, definitely send a PR to add it to the README. 👍.

Thanks for the reference here!

jcrugzz added a commit that referenced this pull request Oct 18, 2015
Updating the upgrading doc
@jcrugzz jcrugzz merged commit ec64e4f into http-party:master Oct 18, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants