Root configuration element for PokerFace There must be one and only one 'server' element. Multiple listen elements may be specified. If none are specified, PokerFace default to an http listener on 127.0.0.1:8080
NOTE: If any of 'secure', 'protocol', 'alias', 'trustAny' attributes are specified, a 'keystore' element MUST be specified
Interface on which to listen for incoming connections (optional, defaults to 0.0.0.0) Port on which to listen for incoming connections (optional, defaults to 80 for insecure and 443 for secure) Should encryption be enabled for this port (optional, defaults to false) Type of encryption to use for this port. If specified, 'secure' is automatically set to 'true'. (optional, defaults to no encryption) Alias of keystore certificate representing this server. If specified, 'secure' is automatically set to 'true'. (optional, if not specified, default java certificate selection will be used) Trust any certificate a client/browser might present. If false, the client must present a certificate that can be validated by our keystore (below). (optional, defaults to true)
Defaults to the current version of PokerFace.
This will be sent back in the HTTP 'Via' header.
If you must override it, please give PokerFace some credit :-) as this is how we track it's popularity, and in turn attract folks to help enhance and develop it.
<= 0: Use same numer of threads as the actual number of physical cpu cores in the machine.
<= 1: The number of threads (up to twice the number of physical cpu cores).
> 0 && < 1: The number multiplied by the number of physical cpu cores (optional, defaults to 0.66).
Enable/disable SO_TIMEOUT (in milliseconds). The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. (optional, defaults to 0) Enable/disable SO_LINGER (in milliseconds). (optional, defaults to -1)
File path to the certificate keystore. (optional)
The keystore must be of the type specified by the system property 'keystore.type' which defaults to 'jks' NOTE: If any of the listen elements above specify an encrypted connection, a keystore (and keypass) must be specified.
The password used to check the integrity of or unlock (e.g. the keystore resides on a hardware token device), the keystore. (optional, defaults to null a.k.a. none) The password for recovering keys in the KeyStore (required only if a keystore is specified, but may be an empty string) List of remote Target's to proxy. Multiple target elements may be specified. You could have zero elements however if your scripts were handling all requests.
It is perfectly fine to have multiple target's pointing at the same host, but with different 'pattern's.
NOTE: The ordering of 'target' elements is honored, so you should list more specific target's first.
ALSO: PLEASE see the Quick Start Guide for a discussion about the 'DocumentRoot' problem that all http proxies face.
Uri/Url request patterns received from the client/browser which match this expression will be forwarded to this target (unless overridden by a script).
Incoming requests that do not match any of the target patterns will cause PokerFace to return a 404 (NOT_FOUND).
Patterns may begin or end with a wildcard '*', but will be ignored elsewhere. Url of the that should be prepended to the request received from the client/browser before issuing a request to this target.
NOTE: The '#' anchor itself is optional but if present indicates how many characters should be stripped from the front of the client/browser request before adding it to this 'url' (Please see the Quick Start Guide for further explanation).
Defaults to the current version of PokerFace.
This will be used for all requests to the configured remote targets above. If you must override it, please give PokerFace some credit :-) as this is how we track it's popularity, and in turn attract folks to help enhance and develop it.
<= 0: Use the same number of threads as the actual number of physical cpu cores in the machine.
<= 1: The number of threads (up to twice the number of physical cpu cores).
> 0 && < 1: The number multiplied by the number of physical cpu cores (optional, defaults to 0.66).
Enable/disable SO_TIMEOUT (in milliseconds). The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. (optional, defaults to 0) Enable/disable SO_LINGER (in milliseconds). (optional, defaults to -1) Amount of time (in milliseconds) that the connection will block until established or an error occurs. A timeout of zero is interpreted as an infinite timeout. (optional, defaults to 0) Buffer size (in KiloBytes) to be used for proxying each connection between the client and a remote target (optional, defaults to 1024K) Ignore any certificate errors presented by any of the below configured targets (optional, defaults to false) Encryption protocol that PokerFace should request when communicating with the below configured targets (optional, defaults to "TLS") Maximum number of total connections to remote targets at any given time.
NOTE: Because PokerFace uses Async NIO, this can be a very high number, BUT should be just less than the number of open sockets supported by your system.
(optional, defaults to 1023)
Maximum number of connections to any one remote target at a time.
NOTE: Because PokerFace uses Async NIO, this can be a very high number, BUT should be just less than the number of open sockets supported by your system.
(optional, defaults to 1023)
Configure Nashorn based scripts (optional element)
Please see the Scripting PokerFace Guide for for more details
File path to a root directory containing the scripts. (required) If true PokerFace will watch the 'rootDirectory' for script changes and dynamically load, modify, delete script endpoints as the file system changes. (optional, defaults to false) If true, PokerFace will allow scripts to dynamically specify remote targets *not* in the configured list above. Use this option wisely! (optional, defaults to false) Path to a Javascript library that will be preloaded into the Nashorn script engine (optional, multiple library elements may be specified).
WARNING:
You will still need to respect the mutability/immutability constraints of the endpoint methods.
In other words, the library may NOT modify its own internal state when called from an immutable endpoint method.
The 'scriptConfig' element (if present) will be passed to the 'setup' method of every JavaScript endpoint in the root script directory.
The content of this element may be any well formed xml.
Configure PokerFace to serve static files from a root directory File path to a root directory containing the static files to be served. (required) Additional Mime Type/Extensions mappings (PokerFace already knows the basic ones) Standard format mime type. Comma separated list of applicable extensions (.otf,.ttf)