GithubHelp home page GithubHelp logo

Comments (5)

marknuzz avatar marknuzz commented on May 28, 2024

Perhaps an approach to have a similar proxy in inverse, on the client machine, would fix this?

from iisexpress-proxy.

icflorescu avatar icflorescu commented on May 28, 2024

I guess this is kind of an edge scenario, but it doesn't look like a bug in iisexpress-proxy.

Your server-side method generates URLs based on HttpContext.Current.Request.Url.Authority HttpContext.Current.Request.ApplicationPath. Can you please post a few sample URLs you're getting with and without using iisexpress-proxy?

from iisexpress-proxy.

marknuzz avatar marknuzz commented on May 28, 2024

The above method produces the same url with or without the proxy.

example, if my website is hosted at localhost:1000, and my proxy allows the network to access 192.168.1.200:2000

above method produces: localhost:1000/Assets/foo.js

So on my macbook which is not hosting the site, I am going to 192.168.1.200:2000 but foo.js fails to load because it is trying to use localhost:1000/Assets/foo.js instead of 192.168.1.200:2000/Assets/foo.js

Only way I can see to fix this is to also have a similar proxy on my macbook, so that I can, on my macbook go to localhost:1000 and all traffic to that location is rerouted to 192.168.1.200:2000. Do you know of a way I can do that? Thank you.

from iisexpress-proxy.

icflorescu avatar icflorescu commented on May 28, 2024

Oh, I see. Including the hostname in dynamically generated URLs is always going to be a problem.
Basically, this utility is working by convincing IISExpress that requests are coming from localhost, so your method will always put localhost in the generated URLs. I really can't think of a simple way to circumvent this...

I've intended iisexpress-proxy to be a quick-and-dirty solution for the simplest use cases, and yours is clearly not one of them :-). So maybe you should have a look at browsersync.io. It's a nice, featured-packed utility I'm using for my own development workflow, since I've fully switched from .NET to Node.js. You can even tunnel your local server to public temporary subdomains on localtunnel.me and synchronize user actions across multiple devices...

from iisexpress-proxy.

icflorescu avatar icflorescu commented on May 28, 2024

Going to close this now, since it's not a bug in iisexpress-proxy.

from iisexpress-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.