Last active
September 17, 2020 13:48
-
-
Save keburak/b9b0fad40eb441dbdb7793f0c283e7bf to your computer and use it in GitHub Desktop.
netscaler-multiple-cors-pol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add policy patset CORS_origins_allowed | |
bind policy patset CORS_origins_allowed .domain.com -index 1 | |
bind policy patset CORS_origins_allowed .domain.com -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\").NOT" CORS_deny_response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment