Forum Discussion
Marcel_Derksen_
Nimbostratus
Jan 26, 2005Validate Application Requests
Hi,
I want the F5 to validate the application request so it can function as a full L7 proxy. Is there a way to solve this using iRules or is this something that is standard behaviour? So if a look into HTTP when I use the HTTP_REQUEST option is this request checked to see if it is a normal HTTP request before the condition HTTP_REQUEST is met?
Marcel
1 Reply
- unRuleY_95363Historic F5 AccountHi Marcel,
The BigIP doesn't necessarily validate HTTP requests. We do validate that the request is compliant with RFC2616. Ie, the first line of a request has three fields, the method, a uri, and a version. We do not validate what the methods are or what the version is.
If you would like to do that kind of thing, then the following rule example should help:class valid_methods { "GET" "POST" "HEAD" } rule validate_http { when HTTP_REQUEST { if { [HTTP::version] eq "Unknown" } { log "Invalid HTTP version - connection from: [IP::remote_addr]:[TCP::remote_port] rejected" reject } elseif { not [matchclass [HTTP::method] equals $::valid_methods] } { log "Invalid HTTP method [HTTP::method] - connection from: [IP::remote_addr]:[TCP::remote_port] rejected" reject } } }
You can update the valid_methods class to include any methods your site might need.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
