locked
Reverse Proxy Using httpHandler, Chris Love RRS feed

  • Question

  • User-1154213614 posted

    It would be nice to hear from Chris Love on this (I have purchased his "Leverage..." e-book) but I am afraid the info I am lookng for is for a custom httphandler that acts as a REVERSE PROXY. SOmething that would capture the request, find a mapped URL where the actual content is, build a new request based on the mapped URL, pass all the headers/cookies from the context request to the new request object and then makes a call to the server to serve this.


    Anyone done this in .net? Any pointers/advice would be appreciated.


    Ponters to: Re parsing content URL???

    I wonder if any pointers from others who have done this before (or/and Chris Love too). Also, I have heard that once the response is back from the server, and at the point of attaching ths to current context's response, a rewriting of all URLs insde the response content (when HTML content) is needed. But why? not sure...

    Since the Reverse proxy is there to serve content without the client seeing the underlying content url, why map. Isn't it more important for the pages that served to have links/images with relatve paths?? So why re-do the links/images at tme of rendering?


    Pointers to: Passing Headers/cookies back/forth. 

    What is the best practice here etc. Do we need to validate headers too? I am thinking of the response splitter hack.


    Pointers to: performance enhancements

    Make it multithreaded? how do you keep track of which response for which request??


    Pointers to: anything else you may know , encountered?

    Please point me to right areas and advice would be nice too.


    It would be also great  to hear from Chris Love about his intake on reverse proxy using httphandlers.

    Cheers

    Friday, August 28, 2009 8:54 AM

All replies

  • User1696475319 posted

    I'm no Chris Love, but that sounds like a context.RewritePath call.  Sadly for me, I don't know what this 'reverse proxy' is about but from your description, it sounds like it involves a lot of code to duplicat ethe functionality of a RewritePath. 

    Monday, August 31, 2009 4:29 PM
  • User-1154213614 posted

    Thanks for the replay mendhak. Appreciate it.

    The reason we need the reverse proxy is because we want to provide internal content to a set clients. We want to limit access and monitor this too. With reverse proxy, we can capture a specific request and serve content from any server we want.

    Whereas ReWritePath allows to capture current request, and serve this but by showing neater URLs. Useful when trying to strip out cookieless URLs.


    Cheers for your help

    Tuesday, September 1, 2009 9:35 PM