Hi, I am trying to redirect a user to login page if not logged in and redirect the user back to original page after login. The login page is on a different domain than the primary domain where requests are coming.
I have a few questions/feature requests related to http-request redirect a) urlencode function - I want to capture the request uri in url parameter while using http-request redirect. However, I can't seem to find a way to encode the value Something like, http-request redirect code 302 location http://sso.domain/login?referer=%[urlencode(capture.req.uri)] I can use capture.req.uri only but that leads to an invalid url since the value is not url encoded. b) urldecode function - Post successful login, I would like to redirect user back to original referer url http-request redirect code 302 location %[urldecode(urlp(referer))] c) set-cookie dynamic value - Based on my tests, set-cookie parameter doesn't take dynamic values. I would like to set the value based on request parameters http-request redirect set-cookie sessionId=%[urlp(sessionId)] location.... Please let me know if you see value in implementing these features in haproxy. Regards, Vivek