Forum Discussion
How to allow 405 response code for certain HTTP Header?
Can u pls try with irule if possible.
when HTTP_REQUEST {
if { [HTTP::header exists "X-Special-Header"] } {
set allow_405 1
} else {
set allow_405 0
}
}
when HTTP_RESPONSE {
if { $allow_405 } {
if { [HTTP::status] == 405 } {
# Allow the 405 response if the special header was present in the request
# Optionally log this event
log local0. "Allowing 405 response for request with X-Special-Header"
} else {
# Reset the allow_405 flag if the response status is not 405
set allow_405 0
}
}
}
- logan92Jul 10, 2024Altocumulus
Hi,
what is the action for this part? it will allow 405 response code if it sees this special header in the request?
if { [HTTP::status] == 405 } {
# Allow the 405 response if the special header was present in the request
# Optionally log this event
log local0. "Allowing 405 response for request with X-Special-Header"
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