Forum Discussion
Mike_Roe_60070
Nimbostratus
Nov 23, 2010Remote login page needs to know which site request came from.
Hi all, We have a need to hide all our apps behind a single login application and are using a remote login page in an APM policy to do this. The problem is that this login app needs some way of finding out which of our 500+ sites the request originated from. We were hopeful that we could just use the referer header but, as the first hop in this process is the F5 VIP that the policy is assigned to the referer shows http://my.app.com/my.policy. Is there any way that the login app can be passed a variable or a cookie that contains the referer from the original link that the user clicked? I was thinking Access::session data or a cookie header or something but, I cant understand how to pass that from the access policy to the login page. Any thoughts? Any help?
Thanks
- Chris_Miller
Altostratus
I'll offer this up as an option, but haven't dealt with this situation so can't say it's the right way to go.when HTTP_REQUEST { set req_uri [HTTP::uri] log local0. "Referer was $req_uri" } when HTTP_RESPONSE { HTTP::cookie insert "real_referer" "$req_uri" log local0. "inserted real_referer cookie with value $req_uri" }
- Mike_Roe_60070
Nimbostratus
Well I modified this a little and got the logs to at least lie to me and tell me its working. Here is what I have done: - Chris_Miller
Altostratus
I used [HTTP::uri] because that's the requested page rather than relying on the browser to have a correct referer header. If you aren't seeing a value for $req_uri in your HTTP_REQUEST event, it's because the header didn't exist on that request. As far as the cookie being added, you're not seeing the log event from HTTP_RESPONSE at all? - Mike_Roe_60070
Nimbostratus
Sorry I didnt reply earlier. We had to go a different route with the login page. It became a problem for too long so we abandoned the need to identify the source site. - Mike_Roe_60070
Nimbostratus
Sorry I didnt reply earlier. We had to go a different route with the login page. It became a problem for too long so we abandoned the need to identify the source site.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects