dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.46k stars 10.03k forks source link

Add support for outbound rules in rewrite middleware #5986

Open jkotalik opened 8 years ago

jkotalik commented 8 years ago

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.

aleq commented 7 years ago

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

iamsunny commented 4 years ago

Hi, any update on the Outbound Rules?

davidfowl commented 4 years ago

No, we have no plans to implement them

iamsunny commented 4 years ago

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.

MohammadMokhtarii commented 4 years ago

Hi, any update on the Outbound Rules? @davidfowl

Do You Find Any Solution ? @iamsunny

iamsunny commented 4 years ago

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?