Forum Discussion
Andreia
Cirrus
Jan 10, 2023iRule - Authorization Bearer / Basic
Hi everyone! I'm trying to "translate" a postman request to an iRule, however, I need help because I have no idea how to handle this in an iRule. When the request is of type BasicAuth, origin servi...
- Jan 10, 2023
HTTP_REQUEST is in the request which goes to the backend server, HTTP_RESPONSE is for the response from the server to the client. To correct your iRule:
when HTTP_REQUEST { if { [HTTP::header Authorization] contains "Basic" } { log local0.debug "Basic: [HTTP::header Authorization]" HTTP::insert X-HUB-BASIC "[HTTP::header Authorization]" } elseif { [HTTP::header Authorization] contains "Bearer" } { log local0.debug "Bearer: [HTTP::header Authorization]" HTTP::insert X-HUB-Bearer "[HTTP::header Authorization]" } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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