Rewrite url in upstream block

Hi,

I am using a query parameter in upstream module to serve request based
on
consistent hashing. This query parameter is introduced in the request
handler module and not originally coming from the downstream. I would
like
to remove this parameter once the job is done before sending it to an
upstream server but I couldn’t see a place where to do this. Rewrite
rules
are not allowed in upstream block. Is there a better way of doing this?

Thanks,
Gona

Posted at Nginx Forum:

Any help on this really appreciate.

The request handler is in Lua. It basically breaks a request in to sub
requests, adds a query parameter to each sub request and directs them
through an consistent hash upstream module in C. The upstream
configuration,
reads the query parameter and sets it to the command variable. I don’t
see a
way to remove the query parameter after this step.

Posted at Nginx Forum: