Forum Discussion
cv_01_137078
Nimbostratus
Nov 05, 2013Access-Control-Allow-Origin on F5
Please guide me as to how Access-Control-Allow-Origin header is inserted on F5
Kevin_Stewart
Employee
Nov 05, 2013Had to do a little research on CORS:
http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
And based on the above, this is perhaps a start:
when HTTP_REQUEST {
if { [HTTP::header exists Origin] } {
set origin_host [HTTP::header Origin]
}
}
when HTTP_RESPONSE {
if { [info exists origin_host] } {
if { $origin_host equals "http://www.example.com" } {
HTTP::header insert Access-Control-Allow-Origin $origin_host
}
}
}
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