0

I am new to haproxy and I wanted to know the best way to encode the URL in haproxy.

http-request redirect code 302 location https://testservice.com/login?service=abc&redirect_uri=https://login.serivce.com?next_url=%[hdr(host)]%[capture.req.uri,regsub(&,%26,g)] unless cookie

In the above statement, I want to encode anything that comes after redirect_url,

Can someone suggest me, please?

Mahesh G
  • 101
  • 3
  • what do you want to solve? – djdomi Sep 23 '21 at 03:52
  • @djdomi, In the above example, I want to encode the content present after the redirect_url parameter, when the redirection happens. – Mahesh G Sep 23 '21 at 03:58
  • its looks for me like an [X-and-Y-Problem](https://faq-database.de/doku.php?id=en:x-and-y-problem) please be more specific, what is the use case you want to have. – djdomi Sep 23 '21 at 10:16
  • 2
    Does this answer your question? [HAProxy encode url for querystring](https://serverfault.com/questions/910336/haproxy-encode-url-for-querystring) – djdomi Sep 23 '21 at 10:17

0 Answers0