238Citrix NetScaler Policy Configuration and Reference Guide

Examples of Advanced Expressions

Expression Type

Sample Expressions

 

 

Look for a particular file type in an

http.req.url.contains(".html")

HTTP request based on the file

http.req.url.contains(".cgi")

extension.

 

http.req.url.contains(".asp")

 

http.req.url.contains(".exe")

 

http.req.url.contains(".cfm")

 

http.req.url.contains(".ex")

 

http.req.url.contains(".shtml")

 

http.req.url.contains(".htx")

 

http.req.url.contains("/cgi-bin/")

 

http.req.url.contains("/exec/")

 

http.req.url.contains("/bin/")

Look for anything that is other than

http.req.url.contains(".gif").not

a particular file type in an HTTP

http.req.url.contains(".jpeg").not

request.

 

 

Check the type of file that is being

http.res.header("Content-Type").conta

sent in an HTTP response based on

ins("text")

the Content-Type header.

http.res.header("Content-Type").conta

 

 

ins("application/msword")

 

http.res.header("Content-Type").conta

 

ins("vnd.ms-excel")

 

http.res.header("Content-Type").conta

 

ins("application/vnd.ms-powerpoint")

 

http.res.header("Content-Type").conta

 

ins("text/css")

 

http.res.header("Content-Type").conta

 

ins("text/xml")

 

http.res.header("Content-Type").conta

 

ins("image/")

Check whether this response

http.res.header("Expires").exists

contains an expiration header.

 

Check for a Set-Cookie header in a

http.res.header("Set-Cookie").exists

response

 

Check the agent that sent the

http.res.header("User-Agent").contain

response.

s("Mozilla/4.7")

 

http.res.header("User-Agent").contain

 

s("MSIE")

Page 252
Image 252
Citrix Systems 9.2 Look for a particular file type in an, Http request based on the file, Extension, Content-Type header