I have a strange task and I haven't worked with Tomcat yet, so don't beat me strongly.
I have an application written on node.js that generates random string every couple of minutes. After that, it should create rewrite rule for Apache Tomcat using the random string as a condition. The rule should make reverse proxy to the node.js app.
for Apache the rule would be like:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(random_string/?(.*)?)$ http://localhost:8000/$1 [L,P]
</IfModule>
As I know there are two ways for making this:
- Tomcat 8 has own Valve for rewriting
- Tuckey URL filter
Help me please with this issues:
- What popularity of
Tuckeyandvalves.rewrite.RewriteValve - How to make config reload for Tomcat
- How to make proxy reverse using
valves.rewrite.RewriteValve
UPD:
Tuckey Url filter can reload class by param confReloadCheckInterval