Forum Discussion
kitday
Jan 08, 2020Nimbostratus
iRule for CORS OPTIONS Header
I am working on creating an iRule that sends a 200 response when an OPTIONS header is sent. Here is the rule: when HTTP_REQUEST {
if { ( [HTTP::method] equals "OPTIONS" ) } {
...
Jan 08, 2020
Hi kitday,
Can you try this?
when HTTP_REQUEST {
if { ( [HTTP::method] equals "OPTIONS" ) } {
HTTP::respond 200 Access-Control-Allow-Origin "[HTTP::header Origin]" \
Access-Control-Allow-Methods "POST, GET, OPTIONS" \
Access-Control-Allow-Headers "[HTTP::header Access-Control-Request-Headers]" \
Access-Control-Max-Age "86400"
return
}
}
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