SSL Headers Plugin

The sslheaders plugins injects SSL session information into HTTP request headers. It can operate as a global plugin or as a remap plugin.

Plugin Options

The following options may be specified when loading the plugin in plugin.config or remap.config:


This option specifies which HTTP request the SSL headers are attached to.

client causes the headers to be injected into the client request. This is primarily useful if another plugin should inspect then. server is the default and injects the headers into the origin server request. both injects the headers into both the client request and the origin server request.

A list of KEY=VALUE pairs follows any options. The KEY names the HTTP header to inject, and VALUE names the SSL session field.

SSL session field



The client certificate in PEM format


The client certificate subject DN


The client certificate issuer DN


The client certificate serial number in hexadecimal format


The client certificate signature in hexadecimal format


The client certificate validity start time


The client certificate validity end time


The server certificate in PEM format


The server certificate subject DN


The server certificate issuer DN


The server certificate serial number in hexadecimal format


The server certificate signature in hexadecimal format


The server certificate validity start time


The server certificate validity end time

The client.certificate and server.certificate fields emit the corresponding certificate in PEM format, with newline characters replaced by spaces.

If the sslheaders plugin activates on non-SSL connections, it will delete all the configured HTTP header names so that malicious clients cannot inject misleading information. If any of the SSL fields expand to an empty string, those headers are also deleted.


In this example, the origin server is interested in the subject of the server certificate that was used to accept a client connection. We can apply the sslheaders plugin to a generic remap rule to provide this information. The remap.config configuration would be:

regex_map https://* \ @pparam=SSL-Server=server.subject

In this example, we have set proxy.config.ssl.client.certification_level to request SSL client certificates. We can then configure sslheaders to populate the client certificate subject globally by adding it to plugin.config: SSL-Client-ID=client.subject SSL-Client-NotBefore=client.notbefore SSL-Client-NotAfter-client.notafter