Forum Discussion
Set Authorisation Header when calling the response URL
Hi All,
I want to achieve the following usecase, i have added the code to grab the authorisation header, i need to post the authorisation header to the cookigenerator url to get the sitemindercookie.
I dont know how to set the header when calling the url "http://usclspcit192.airservices.eds.com/OAuthDemo/cookiegenerator.html" once the status is "OK"
Code: when HTTP_REQUEST { if { [HTTP::header exists "Authorization"] } {
set authzheaders "Authorization: [HTTP::header value Authorization]"
log local0. $authzheaders
} }
when HTTP_RESPONSE { if { [HTTP::status] == 200} {
log local0. $authzheaders
HTTP::redirect "http://usclspcit192.airservices.eds.com/OAuthDemo/cookiegenerator.html"
}}
Regards, Praque
2 Replies
- nitass
Employee
I dont know how to set the header when calling the url "http://usclspcit192.airservices.eds.com/OAuthDemo/cookiegenerator.html" once the status is "OK"
HTTP::redirect does HTTP GET. for HTTP POST, you need HTTP::retry or sideband. the following thread and article have POST example.
HTTP::retry with post data
https://devcentral.f5.com/questions/httpretry-with-post-dataGoogle reCAPTCHA Verification With Sideband Connections by George Watkins
https://devcentral.f5.com/articles/google-recaptcha-verification-with-sideband-connections.UmZDDm0-bIU - Kevin_Stewart
Employee
Just out of curiosity, is the cookigenerator url a separate server that isn't in the path of normal traffic? If so it may make more sense to issue a sideband connection.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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