Answer the question
In order to leave comments, you need to log in
How to correctly set up a redirect to services if they accept different parameters?
There is a problem. I have an application written in velocity and inside it has the following code:
#set($regular = true)
#if ($regular)
<frame src="webservice1.com/?id=123&name=misha" />
#else
<frame src="webservice2.com/?UserIdentifier=123&UserName=misha" />
#end
$regular=false
.probe
- everything would be fine with this, but I can’t create a normal director in varnish because I can’t parse the parameters in the proxy server and rebuild them again. And in general, this is not a task for a proxy server - to rummage through the parameters..probe
velocity. That is, varnish does probing, and java redirects. Answer the question
In order to leave comments, you need to log in
Answering your own question ... If it's a varnish, like a proxy, then it's done like this in the config
set req.backend = webservice1;
if (req.backend.healthy)
{
#redirect there
}
set req.backend = webservice2;
if(req.backend.healthy)
{
#change parameters with regex and redirect
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question