mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 48 forks source link

support for azure debug environment #181

Closed chriskeyser closed 12 years ago

chriskeyser commented 12 years ago

RequestReduce looks great, but I'm having some trouble when using with azure development. The azure debug environment simulates a load balancer. As a result request coming in on port 81 are mapped to port 82 in the incoming request, but files will not serve from port 82. RequestReduce attempts to pull files from port 82 rather than the original port 81, and fails (this can be avoided in azure development by using Request.Headers["Host"]) instead). (see http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/87c729e8-094c-4578-b9d1-9c8ff7311577 for more information. Everything else is setup correctly for my site, it does work correctly when I launch the mvc application outside of the development fabric.

Is this a problem you have seen and are there any workarounds?

mwrock commented 12 years ago

Take a look at the rr API in the wiki. I think you want to use the URLtransformer. You would want to do a replace on the third param replacing :82 to :81 and return the new string.