Forum Discussion
David_Leach_148
Nimbostratus
Mar 26, 2014I rule to only allow GETs to elastic
We presently don't have any iRules in place so I'm a little new to this. What we're wanting is to only allow GETS to a particular virtual host and to drop all other types of requests.
What is th...
- Mar 26, 2014
You could do something simple like
when HTTP_REQUEST { if { [HTTP::method] equals "GET" } { pool } else { HTTP::respond 405 "Method not allowedMethod not allowed" } }
Richard__Harlan
Mar 26, 2014Historic F5 Account
You could do something simple like
when HTTP_REQUEST {
if { [HTTP::method] equals "GET" } {
pool
} else {
HTTP::respond 405 "Method not allowedMethod not allowed"
}
}
David_Leach_148
Nimbostratus
Mar 26, 2014Oh, we still want GET request to go to all other webservers.
It's only the one pool we want to restrict to only having GETS. So would we do something like this...
when HTTP_REQUEST {
if { [HTTP::method] equals "GET" } && { [pool equals elastic]}{
pool elastic
} else {
HTTP::respond 405 "Method not allowed"
}
}
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