aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Add support for outbound rules in rewrite middleware

Open jkotalik opened this issue 10 years ago • 6 comments

As an extension on my implementation of UrlRewrite, Outbound rules will look through an Http response for any regex match, and replace them appropriately. Documentation here: http://www.iis.net/learn/extensions/url-rewrite-module/creating-outbound-rules-for-url-rewrite-module http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-20-configuration-reference

The big problem here will be perf, as we are going to regex match on the whole body of the response.

This would probably be an extension on top of the rewriter.

jkotalik avatar Sep 02 '16 18:09 jkotalik

Is there already extension for outbound rules, I couldn't find anything about it?

aleq avatar Sep 04 '17 08:09 aleq

Hi, any update on the Outbound Rules?

iamsunny avatar Dec 03 '19 09:12 iamsunny

No, we have no plans to implement them

davidfowl avatar Dec 03 '19 10:12 davidfowl

thanks @davidfowl for replying. Please, do you suggest any alternate for the outbound rewrite rules? I've a situation to replace body contents before the content is rendered. I'm not sure if Regex would be costly in terms of performance. I highly appreciate any pointers, thanks.

iamsunny avatar Dec 03 '19 10:12 iamsunny

Hi, any update on the Outbound Rules? @davidfowl

Do You Find Any Solution ? @iamsunny

MohammadMokhtarii avatar Jun 05 '20 10:06 MohammadMokhtarii

Not yet @mmokhtari, I'm doing string replacement using Regex on the final output before rendering. Not sure why we can't have this feature out of the box?

iamsunny avatar Jun 05 '20 11:06 iamsunny