Forum Discussion
VijayG_122615
Nimbostratus
Mar 12, 2013how to insert Basic Authorization into http header while redirecting
Hi ,
i am trying to insert a common user id and pwd intp "Basic Authorization" of http header and redirect the same to new url. tired HTTP::header insert Authorization cmd but it isnt working ...
Can you post some anonymized samples of the URI's you want to rewrite? Is the client using an absolute URI? Something like this?
GET http://www.w3.org:55555/pub/WWW/TheProject.html HTTP/1.1
User-Agent: ...
If so, you could use string map instead of regsub. The string function would be more efficient than a regex.
HTTP::uri [string map {:55555/ /} [HTTP::uri]]
If you also need to rewrite the port in response content, you could use a stream filter and STREAM::expression based iRule. This would be more efficient than collecting the response content and performing regex operations on it. You can check the STREAM::expression wiki page (Click here) for examples.
Aaron
- Mayur_SutareSep 18, 2020
MVP
,
With this, your virtual server itself won't show/become available. Kindly configure a pool and add required node under it with service port where your service/application is running. So F5 will forward request to the node on configured service. With this, if pool come up, your virtual server will also become available once you configure iRule on it. And it will work as expected.
when CLIENT_ACCEPTED { pool POOL_NAME }
Hope it helps!
- Pedro_BoavidaSep 18, 2020
Nimbostratus
Hi,
The missing code in the irule performs a name lookup to determine its IP address (dynamic).
It used to work before.
Thanks for your help anyway.
Regards