Skip to content

Proxy all requests, not just unhandled ones #912

Open
@thany

Description

@thany

What's the problem this feature will solve?

I just need a quick forward proxy server, so that I can use my phone to reach a website that is running on my pc locally. I can't reach that local website directly from my phone, because it would require changing the hosts file, which is not possible on mobile.

I also can't change the hostname requirement on this local website, because it requires an impractical amount of time to do so. Not something we're proud of, but it is what it is, for the moment.

Describe the solution you'd like

I would like to be able to execute something like

http-server --proxy http://website.local/ --proxy.all true

Or something. So that opening http://<ipaddress>:8080 doesn't initially show a directory listing of where this command happened to have been executed, but instead shows the website being proxied.

Basically this means it would disable static file serving completely, iyam.

Alternative Solutions

I guess firing up an apache server and doing whatall configuration to get it to work that way, could be an alternative solution, but not one that is very portable and/or easily runnable through a package.json script.

I've looked at a few other static file serving packages, but they don't appear to support forward proxying at all, unless I overlooked something. So my hope remains with this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions