Forum Discussion
iRule giving 401 unauthorized error
Hi, Can anyone help me with the below iRule? I am getting a 401 unauthorized error when I use the below iRule but I get a 200 ok without the iRule. Should I include the pool information in the iRule ?
when RULE_INIT { set nURI 0 }
when HTTP_REQUEST priority 500 {
switch -glob [HTTP::uri] {
"/" {
set nURI [string map {"/" "/v1/"} [HTTP::uri]]
}
default {
set nURI [HTTP::uri]
}
}
HTTP::uri "${nURI}"
}
1 Reply
- Vijay_E
Cirrus
Can you use CURL to identify the exact response ? The reason you are getting 401 is because your iRule is changing the URI to something that the servers don't understand. I would also recommend using "log local0." statements in order to log the URI before and after the change by iRule. For logging, see here.
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