Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reverse proxy with body content modify ability #1164
Hello, I want to thank you all for developed this great webserver with easy to config admin interface.
I agree on the hairy details comment... be very careful here. HTML is not a string (see first answer in this post on SO. http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags).
Those apache and nginx libraries exist and they do work but it is _extremely sensitive and the development of those rules should not be done in a live web server environment. You _will crash your server, or at a minimum destroy the output of your site at some time, regardless of how awesome you are at regular expressions. There must be a full test suite provided alongside this feature if it is to be provided in a management UI. (just my two cents).
Additionally, there is (at least one) Java library that supports an approach to modification of (X)HTML documents in a much more robust fashion. Perhaps a port of a library like jsoup or htmlcleaner might be more effective consideration than just plain ol' regex?