Configuration files can be modified through Maintenance»Files»Configuration.
To apply changes after a modification, go to Maintenance»Summary»maintenance page and press "Restart server".

greasyspoon.ini     » ICAP parameters, libraries path and overall timeout/threshold for scripts
Parameter Default value Role
ISTAG greasyspoon-1.0.1-b01 Provides a way for ICAP servers to send a service-specific "cookie" to ICAP clients that represents a service's current state. It must NOT exceed 32-byte-maximum alphanumeric string of data. An ICAP client should flush all cached data when detecting an change on this tag.
Service GreasySpoon ICAP Server ICAP Service description
Service-ID 1.0.1-b01 A short label identifying the ICAP service. Used by some ICAP clients
Options-TTL 180 (seconds) Set how frequently ICAP clients will ask for ICAP parameters update
Max-Connections 100 Defines how much ICAP parallel connections GreasySpoon will support. To adapt regarding mainly memory allocated to GreasySpoon.
Keep-Alive enable Set if ICAP keep-alive will be supporterd. Default is enable, set to "off" or "disable" to disable it.
Preview 0 Set content asked in preview mode. Preview is used to check if traffic match a defined rule before asking for content.
Tip: configure a minimal preview of 48 (bytes) when using MimeMagic to optimize processing.
path conf;serverscripts; Path added to greasyspoon environment
maxtimeout 5000 (milliseconds) Defines overall processing time allocated to scripts in ms. Scripts are aborted if this value is exceeded (valid changes are kept)
errorthreshold 10 Successive error threshold after which a script is considered as invalid and automatically disabled. Set to 0 to disable it.
bypassonerror true Set GreasySpoon behaviour when encountering an error. Default is to bypass service (original content is returned to client. If set to false, returns an ICAP 500 error instead.
services.properties » GreasySpoon variables, supported mime types, etc
Parameter Default value Role
GreasySpoon.servicename greasyspoon Service name displayed in log files (usefull when running multiple services)
GreasySpoon.mimesupported html xml txt css javascript
List of mime types handled by GreasySpoon, separated by space char. Responses will be processed if mime type provided by the server in the Content-Type header contains one of the given string.
GreasySpoon.mimemagic on Enable/disable use of mime magic to detect mime type. If enabled, use magic bytes to detect mime type, and discard responses that are not declared as supported in GreasySpoon.mimesupported list.
Note: responses that cannot be detected as "textual-like" content (binary files, unknown files, ...) are automatically discarded.
GreasySpoon.reqtag .req.server. Extension for Request script files
GreasySpoon.resptag .resp.server. Extension for Response script files
GreasySpoon.comments comments.properties
Filename containing comments format for the supported scripting languages
GreasySpoon.compress on
Set if GreasySpoon will compress (gzip/deflate) content as soon as browser supports it (otherwise, only compress content that was initially compressed by servers)
SpoonScript.reqheadparam requestheader
Name of the variable provided to scripts and containing request header
SpoonScript.reqbodyparam httprequest Name of the variable provided to scripts and containing request body
poonScript.repheadparam responseheader
Name of the variable provided to scripts and containing response header
SpoonScript.respbodyparam httpresponse Name of the variable provided to scripts and containing response body
SpoonScript.cacheparam sharedcache
Name of the hash table provided to scripts
SpoonScript.usergroupparam user_group
Name of the variable provided to scripts and containing user group value
SpoonScript.useridparam user_id Name of the variable provided to scripts and containing user ID value
SpoonScript.icapuserheader x-authenticated-user
Defines either ICAP or HTTP header (in lowercase) used to extract user ID value that will be provided to scripts.
By default, try to extract user ID from ICAP x-authenticated-user header.
SpoonScript.userfallbackheader x-client-ip
If icapuserheader cannot be determined, defines a fall back header (either ICAP of HTTP) as user ID.
By default, fall back to ICAP x-client-ip header.
SpoonScript.icapgroupheader x-authenticated-groups Defines either ICAP or HTTP header (in lowercase) used to extract user group value that will be provided to scripts.
By default, try to extract user ID from ICAP x-authenticated-group header.
SpoonScript.groupfallbackheader user-agent
If icapgroupheader cannot be determined, defines a fall back header (either ICAP of HTTP) as user Group.
By default, fall back to HTTP user-agent header.
SpoonScript.scriptheader ... Skeletton used to create a default new empty script
SpoonScript.java.scriptheader ... Skeletton used to create a new Java empty script
SpoonScript.ruby.scriptheader ... Skeletton used to create a new Ruby empty script
magic.mime » Mime Magic ruleset
Contains the Magic data use to detect responses mime type.
This is a light java implementation of Unix file(1) command, so configuration syntax is the same than for KMimeMagic command.
 
Each line of the file specifies a test to be performed. A test compares the data starting at a particular offset in the file with a 1-byte, 2-byte, or 4-byte numeric value or a string. If the test succeeds, associated content type is taken. The line consists of the following fields :
   » Column #1: byte number to begin checking from, ">" indicates continuation
   » Column #2: type of data to match
   » Column #3: contents of data to match
   » Column #4: MIME type of result
   » Column #5: MIME encoding of result (optional)
 
Nested conditions can be added by starting a line with > tag.
Current implementation is limited to a depth of 2 levels ( '>>' tag). See man page for magic(5) for more information.
Other files
  • comments.properties » Contains single line comment tag associated to a scripting language.
    These tags are used to create header skeletton for new scripts.Note: default value is "//".
  • icapserver.conf » Contains main server startup parameters.
    Entirely configurable using web interface.
  • mime.types » Contains mime types associated to file extensions.
    Used by embeded web server for the administration interface, and by GS for MimeMagic.
  • scriptchecker.properties » Contains parameters and content used to validate scripts.
    Entirely configurable through web interface.