ASP.Net reverse proxy, what to do with external resources?

I am currently working on the concept of a reverse proxy to basically pass responses and requests between the user and another invisible website. Thus, the user basically goes to the site, say, at www.myproxyportal.com, where you can access the website (in the iframe) on the intranet of a web server that is not published (for example, internal.myproxyportal.com).

I worked on a solution where I moved the request objects to the right place and returned this response to the website. Works great except for things like CSS links, IMG, etc. I can do the translation, of course, but then the link will go to internal.myproxyportal.com/css/style.css, and it will never work from the outside.

How to approach such a thing?

Are there any solutions out of the box?

EDIT: I found this one that is very similar to what I wrote so far, but it also does not have support for external images, css, javascript, etc.

+3
source share
2 answers

You can change the settings in IIS to route all requests through the ASP.NET pipeline, not just .aspx pages. Then just create an HttpHandler to handle them in a proxy.

By default, IIS does not start "static" content requests through the ASP.NET engine.

+1
source

Apache has a pretty smooth reverse proxy, I use it extensively.

More details here: http://www.apachetutor.org/admin/reverseproxies

0

Source: https://habr.com/ru/post/1730165/


All Articles