Common server-side component settings

The following settings for the premium server-side components are optional and will apply to all services using the configuration file. These settings should be added to the application.conf file described in Required configuration for the server-side components.

proxy (optional)

This element configures use of an HTTP proxy for outgoing HTTP/HTTPS requests made by the server-side components.

Default proxy settings are picked up from JVM system properties, usually provided on the command line, as defined in Networking Properties for Java. The system properties http.proxyHost, http.proxyPort, http.nonProxyHosts, https.proxyHost, https.proxyPort are recognized as well as http.proxyUser and http.proxyPassword to support authenticating proxies.

This optional proxy element provides an alternative to providing proxy settings as JVM system properties, or to override system properties.

Type Setting Description

element

proxy

Stores HTTP outgoing proxy settings for the server-side components.

attribute

http.proxyHost

A string defining the host name of the proxy for plain HTTP (not HTTPS) connections. (Mandatory)

attribute

http.proxyPort

An integer defining the port number of the proxy for plain HTTP (not HTTPS) connections. (Mandatory)

attribute

http.nonProxyHosts

A list of strings separated by vertical lines ("|") listing hosts and domains to be excluded from proxying, for both plain HTTP and HTTPS connections. The strings can contain asterisks ("*") as wildcards. (Optional, defaults to "localhost|127.*|[::1]" if not set.)

attribute

https.proxyHost

A string defining the host name of the proxy for HTTPS connections. (Optional)

attribute

https.proxyPort

An integer defining the port number of the proxy for HTTPS connections. (Optional)

attribute

http.proxyUser

Username for authenticating to both the HTTP and HTTPS proxy. (Optional)

attribute

http.proxyPassword

Password for authenticating to both the HTTP and HTTPS proxy. (Optional)

In the following example, both HTTP and HTTPS connections (except to localhost and the example.com domain) are proxied through someproxy.example.com on port 8080 and someproxy.example.com does not require authentication.

ephox {
  proxy {
    http.proxyHost = "someproxy.example.com"
    http.proxyPort = "8080"
    https.proxyHost = "someproxy.example.com"
    https.proxyPort = "8080"
    http.nonProxyHosts = "localhost|*.example.com"
  }
}

http (optional)

Some server-side components make outbound HTTP and HTTPS connections. These include Link Checker, Image Editing and Enhanced Media Embed. In an evaluation or pre-production environment, you might want to test these features against resources with untrusted SSL certificates such as in-house servers with self-signed SSL certificates. In these circumstances, it is possible to bypass all SSL security.

This is not recommended for production environments.

Type Setting Description

element

http

Configures HTTP client behavior.

attribute

trust-all-cert

A boolean indicating whether to bypass SSL security and indiscriminately trusts all SSL certificates. Default: false

attribute

request-timeout-seconds

An integer defining the number of seconds to allow HTTP requests to take. Default: 10

Example:

ephox {
  http {
    trust-all-cert = true
  }
}

The request timeout on outbound HTTP and HTTPS connections can be set. Setting this to a larger value will allow larger files through, but they may take a long time. An example might be if you expect to fetch very large files with the image proxy service.

Example:

ephox {
  http {
    request-timeout-seconds = 15
  }
}

Alternative http timeout settings

When greater control over timeout settings is needed, the following three settings can be used instead of the request-timeout-seconds setting:

  • connection-request-timeout-seconds: The amount of time to wait for a connection from the connection pool.

  • connect-timeout-seconds: The amount of time to wait for a connection to be established.

  • socket-timeout-seconds: The amount of time to wait in between packets after a connection is established.

If one of these settings are required, remove request-timeout-seconds and specify values for all three of these settings.

For example:

ephox {
  http {
    connection-request-timeout-seconds = 10
    connect-timeout-seconds = 5
    socket-timeout-seconds = 4
  }
}