Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Netscaler CORS configuration policy for multiple domains with their subdomains
add policy patset CORS_origins_allowed
bind policy patset CORS_origins_allowed -index 1
bind policy patset CORS_origins_allowed -index 2
add responder action CORS_deny_response respondwith q{"HTTP/1.0 401 Unauthorized CORS\r\n\r\n"} -bypassSafetyCheck YES
add responder policy CORS_origin_denied `!(HTTP.REQ.HEADER("Origin").EXISTS && HTTP.REQ.HEADER("Origin").TYPECAST_HTTP_URL_T.HOSTNAME.CONTAINS_ANY("CORS_origins_allowed"))` CORS_deny_response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment