Forum Discussion
Getting around CORS with IRULES
- Nov 13, 2013
you can use the ProxyPassV10 irule for this.
your datagroup content would look like this: www.acmecorp.com/api/ api.acmecorp.com/ pool_api_servers
the virtual server's default pool should be the one for the www.acmecorp.com servers and you must use a oneconnect profile in the VS as well.
the proxypass irule will rewrite any request going to www.acmecorp.com/api/XYZ to api.acmecorp.com/XYZ and send it to the pool pool_api_servers proxypass will also take care of the location header in http redirects and rewrite it for you.
Another question, we have three LTMs sometimes we need to route to a different VIP that only exists on one of the three LTMS. If I get a request on LTM1 and need to get it to a VIP that only exists on LTM2 is that possible?
Absolutely, assuming the LTMs can route to/from one another. If so, you could create a pool on LTM1 that contains the VIP on LTM2, or you could simply use a node command in an iRule. Depending on how the traffic needed to flow, you could just send the request to this pool or node, or you could issue a sideband call within a request or response, ask the LTM2 VIP something, get a response, and then carry on with the original request and traffic flow.
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