martinezgarciadavid opened a new issue #8639:
URL: https://github.com/apache/trafficserver/issues/8639


   Hello,
   
   We have a particular isolated scenery for testing and validation in which we 
have an instance of Apache Traffic Server working as a reverse proxy. Until 
now, for every client request the proxy executes a Lua script (via the Lua 
plugin) that calls a REST API exposed by a third component to dynamically 
select an origin server. The client request URL points to the domain name or IP 
address of the proxy, which is configured in the remap rule. For instance, if 
the proxy domain name is `proxy.tests.home.arpa`, the client requests go to 
that URL.
   
   Now, we want the proxy to answer any request from the client, so that the 
URL requested by the client can be any string. For example, if the client wants 
to access `content1.tests.home.arpa`, the proxy will serve that request, but 
also for `content2.tests.home.arpa`, `contentN.tests.home.arpa` and other 
domain records. Instead of calling the proxy URL, the client would be calling 
directly the content URL. We have read the documentation and we should 
configure a remap rule for the appropiate/associated URL. However, if we follow 
the documentation, we would have a lot of remap rules configured, each of one 
of them for any content URL. We want to avoid this, so I was wondering if it is 
possible to accomplish this with just one remap rule and a regular expression 
for the Host header requested by the client. We are looking for something like 
this (in `remap.config`):
   
   ```
   map http://<regular_expression_to_match_any_host_header_from_client>:8080/ 
http://<regular_expression_to_match_any_host_header_from_client>:9999/ 
@plugin=tslua.so @pparam=lua_script_to_select_origin_server.lua
   reverse_map 
http://<regular_expression_to_match_any_host_header_from_client>:9999/ 
http://<regular_expression_to_match_any_host_header_from_client>:8080/
   ```
   
   Could it be possible? I have been looking at the documentation for the regex 
remap plugin but, as far as I have read, it shouldn't work this desired way.
   
   Thanks a lot for your kind help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to