### Set Server Static Files Options

To set server static files option, the jServer Library version 2.05 or higher is required.
The method Server.SetStaticFilesOptions allow to set configuration parameters, that affect the way
the server serve static files.
Information on the list of parameters:
http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/servlet/DefaultServlet.html
Example set CacheControl
`Sub Process_Globals
Public srvr As Server
End Sub`
`Sub AppStart (Args() As String)
srvr.Initialize("srvr")
srvr.Port =51042
srvr.SetStaticFilesOptions(CreateMap("cacheControl": "max-age=3600"))
srvr.Start
Log("Server started")
StartMessageLoop
End Sub`
Other example:
srvr.SetStaticFilesOptions(CreateMap("cacheControl": "max-age=100000,public","gzip":True,"dirAllowed":False))
gzip:
True = Static content will be served as gzip content encoded if a matching resource is found ending with ".gz".
dirAllowed:
True = Directory listings are returned if no welcome file is found. Else 403 Forbidden.

Changed: , Category: Server, File: T6C246M1785.htm, ID: 1785