Forum Discussion
how to pass F5 by adding the IRULES?
Hi F5User888
all the ACCESS commands are related to the APM module of BIG-IP. See clouddocs.f5.com >> iRules >> ACCESS.
You could use a much simpler iRule
when HTTP_REQUEST {
if { [HTTP::path] eq "/my/wonderful/api" } {
pool api_pool
} else {
reject
}
}
If the request URI matches your API forward the request to the pool. Else send a RESET to the client.
KR
Daniel
- F5User888Dec 14, 2022Nimbostratus
Thanks a lot Daniel!
we have 15 path need to access like below:
in your example, do we need to add anything to F5 for "pool api_pool" or this is a completed example?
also, will my IRule works even if it is not as simpler as your example? Thanks again!- Daniel_WolfDec 14, 2022MVP
In that case I would go with a switch statement indeed. This should work.
Are you using LTM only? Or APM too? The ACCESS commands are related to APM. Unless you have APM, you cannot use them.when HTTP_REQUEST { switch -glob -- [string tolower [HTTP::path] { "/url1/*" - "/url2/*" - "/url3/*" { pool api_pool } default { reject } } }
- F5User888Dec 14, 2022Nimbostratus
Thanks a lot! I think we use APM.
- randylee168Aug 18, 2024Nimbostratus
- "There is a virtual server with an APM Access Policy attached for authentication
- Specific traffic (6 API resources/URLs) needs to bypass authentication in step 1
- For example to be forwarded directly to a pool." --> we do not know to do this step but we need it.
can you please let me know how to do steps 3 in the above. thank u very much!!
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