Skip to content

Commit 38c782d

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e52a7e4 + 4adafd0 commit 38c782d

23 files changed

Lines changed: 109 additions & 205 deletions

docs/usage.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The following query parameters can be used to send a *reconfigure* request to *D
2323
|delResHeader |Additional headers that will be deleted in the response before forwarding it to the client. Multiple headers should be separated with comma (`,`). Change the environment variable `SEPARATOR` if comma is to be used for other purposes. Please consult [Delete a header in the response](https://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#delete-a-header-in-the-response) for more info.<br>**Example:** `X-Varnish,X-Cache`|
2424
|distribute |Whether to distribute a request to all the instances of the proxy. Used only in the *swarm* mode.<br>**Example:** `true`|false|
2525
|httpsPort |The internal HTTPS port of a service that should be reconfigured. The port is used only in the `swarm` mode. If not specified, the `port` parameter will be used instead.<br>**Example:** `443`|
26-
|ignoreAuthorization|If set to true, the service destination will not require authorization. The parameter must be prefixed with the index of the service destion that should be excluded from authorization.<br>**Default:** `false`<br>**Example:** `true`|
26+
|ignoreAuthorization|If set to true, the service destination will not require authorization. The parameter must be prefixed with the index of the service destination that should be excluded from authorization.<br>**Default:** `false`<br>**Example:** `true`|
2727
|isDefaultBackend |If set to true, the service will be set to the default_backend rule, meaning it will catch all requests not matching any other rules.<br>**Default:** `false`<br>**Example:** `true`|
2828
|port |The internal port of a service that should be reconfigured. The port is used only in the `swarm` mode. The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `port.1`, `port.2`, and so on). This field is **mandatory** when running in `swarm` or `service` mode.<br>**Example:** `8080`|
2929
|reqMode |The request mode. The proxy should be able to work with any mode supported by HAProxy. However, actively supported and tested modes are `http`, `tcp`, and `sni`. The `sni` mode implies TCP with an SNI-based routing. The parameter can be prefixed with an index thus allowing definition of multiple modes for a single service (e.g. `http`, `tcp`, and so on).<br>**Default:** value of the `DEFAULT_REQ_MODE` environment variable.<br>**Example:** `tcp`|
@@ -36,7 +36,7 @@ The following query parameters can be used to send a *reconfigure* request to *D
3636
|timeoutServer |The server timeout in seconds.<br>**Default:** `20`<br>**Example:** `60`|
3737
|timeoutTunnel |The tunnel timeout in seconds.<br>**Default:** `3600`<br>**Example:** `3600`|
3838

39-
Multiple destinations for a single service can be specified by adding index as a suffix to `servicePath`, `srcPort`, `port`, `userAgent`, `ignoreAuthorization`, `serviceDomain``allowedMethods`, `deniedMethods`, `denyHttp`, `httpsOnly`, `redirectFromDomain`, `ReqMode`, or `outboundHostname` parameters. In that case, `srcPort` is required.
39+
Multiple destinations for a single service can be specified by adding index as a suffix to `servicePath`, `servicePathExclude`, `srcPort`, `port`, `userAgent`, `ignoreAuthorization`, `serviceDomain``allowedMethods`, `deniedMethods`, `denyHttp`, `httpsOnly`, `redirectFromDomain`, `ReqMode`, or `outboundHostname` parameters. In that case, `srcPort` is required.
4040

4141
### HTTP Mode Query Parameters
4242

@@ -54,12 +54,13 @@ The following query parameters can be used only when `reqMode` is set to `http`
5454
|outboundHostname|The hostname where the service is running, for instance on a separate swarm. If specified, the proxy will dispatch requests to that domain. The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `outboundHostname.1`, `outboundHostname.2`, and so on).<br>**Example:** `ecme.com`|
5555
|pathType |The ACL derivative. Defaults to *path_beg*. See [HAProxy path](https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.6-path) for more info.<br>**Example:** `path_beg`|
5656
|redirectFromDomain|If a request is sent to one of the domains in this list, it will be redirected to one of the values of the `serviceDomain`. Multiple domains can be separated with comma (e.g. `acme.com,something.acme.com`). The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service.<br>**Example:** `acme.com,something.acme.com`|
57-
|redirectWhenHttpProto|**This parameter is temporarily disabled until the problems around it are solved**. Whether to redirect to https when X-Forwarded-Proto is set and the request is made over an HTTP port.<br>**Example:** `true`<br>**Default Value:** `false`|
57+
|redirectWhenHttpProto|Whether to redirect to https when X-Forwarded-Proto is set and the request is made over an HTTP port.<br>**Example:** `true`<br>**Default Value:** `false`|
5858
|serviceCert |Content of the PEM-encoded certificate to be used by the proxy when serving traffic over SSL.|
5959
|serviceDomain |The domain of the service. If set, the proxy will allow access only to requests coming to that domain. Multiple domains can be separated with comma (e.g. `acme.com,something.else.com`). The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `serviceDomain.1`, `serviceDomain.2`, and so on). Asterisk sign can be placed to beginning of value and in this case **serviceDomainAlgo** parameter will be **replaced** to `hdr_end(host)`. This parameter is **mandatory** if `servicePath` is not specified.<br>**Example:** `ecme.com`|
6060
|serviceDomainAlgo|Algorithm that should be applied to domain ACLs. Any ACL works only with one flag: `-i : ignore case during matching of all subsequent patterns`. If not set, the value of the environment variable `SERVICE_DOMAIN_ALGO` will be used instead. If defaults to `hdr_beg(host)`<br>**Examples:**<br>`hdr(host)`: matches only if domain is the same as `serviceDomain`<br>`hdr_dom(host)`: matches the specified `serviceDomain` and any subdomain (a string either isolated or delimited by dots). **Example:** if `hdr_dom(host)` contains `www.ecme.com` and `serviceDomain` equals `ecme.com` the rule will be passed.<br>`req.ssl_sni`: matches Server Name TLS extension|
6161
|serviceHeader|Headers used to filter requests. If set, the proxy will allow access only to requests that contain specified headers. A header consists of a key and value separated with colon (e.g. `X-Version:3`). Multiple headers can be separated with comma (e.g. `X-Version:3,name:viktor`). The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `serviceHeader.1`, `serviceHeader.2`, and so on). <br>**Example:** `X-Version:3,name:viktor`|
6262
|servicePath |The URL path of the service. Multiple values should be separated with comma (`,`). The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `servicePath.1`, `servicePath.2`, and so on). This parameter **is mandatory** unless `serviceDomain` is specified.<br>**Example:** `/api/v1/books`|
63+
|servicePathExclude|The URL path that should be excluded from the rules. Multiple values should be separated with comma (`,`). The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `servicePathExclude.1`, `servicePathExclude.2`, and so on).<br>**Example:** `/metrics`|
6364
|sessionType |Determines the type of sticky sessions. If set to `sticky-server`, session cookie will be set by the proxy. Any other value means that sticky sessions are not used and load balancing is performed by Docker's Overlay network.<br>**Example:** `sticky-server`|
6465
|sslVerifyNone|If set to true, backend server certificates are not verified. This flag should be set for SSL enabled backend services.<br>**Example:** `true`<br>**Default Value:** `false`|
6566
|templateBePath|The path to the template representing a snippet of the backend configuration. If specified, the backend template will be loaded from the specified file. See the [Templates](#templates) section for more info.<br>**Example:** `/tmpl/be.tmpl`|
@@ -70,7 +71,7 @@ The following query parameters can be used only when `reqMode` is set to `http`
7071
|usersPassEncrypted|Indicates whether passwords provided by `users` or `usersSecret` contain encrypted data. Passwords can be encrypted with the command `mkpasswd -m sha-512 password1`.<br>**Example:** `true`<br>**Default Value:** `false`|
7172
|verifyClientSsl|Whether to verify client SSL and, if it is not valid, deny request and return 403 Forbidden status code. SSL is validated against the `ca-file` specified through the environment variable `CA_FILE`.<br>**Example:** true<br>**Default Value:** `false`|
7273

73-
Multiple destinations for a single service can be specified by adding index as a suffix to `servicePath`, `srcPort`, `port`, `userAgent`, `ignoreAuthorization`, `serviceDomain`, `allowedMethods`, `deniedMethods`, `denyHttp`, `httpsOnly`, `redirectFromDomain`, `ReqMode`, or `outboundHostname` parameters. In that case, `srcPort` is required.
74+
Multiple destinations for a single service can be specified by adding index as a suffix to `servicePath`, `servicePathExclude`, `srcPort`, `port`, `userAgent`, `ignoreAuthorization`, `serviceDomain`, `allowedMethods`, `deniedMethods`, `denyHttp`, `httpsOnly`, `redirectFromDomain`, `ReqMode`, or `outboundHostname` parameters. In that case, `srcPort` is required.
7475

7576
### TCP Mode HTTP Query Parameters
7677

@@ -132,6 +133,7 @@ The map between the HTTP query parameters and environment variables is as follow
132133
|serviceDomain |SERVICE_DOMAIN |
133134
|serviceName |SERVICE_NAME |
134135
|servicePath |SERVICE_PATH |
136+
|servicePathExclude |SERVICE_PATH_EXCLUDE |
135137
|setReqHeader |SET_REQ_HEADER |
136138
|setResHeader |SET_RES_HEADER |
137139
|srcPort |SRC_PORT |

errorfiles/400.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/403.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/405.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/408.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/429.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/500.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/502.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/503.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

errorfiles/504.http

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ Content-Type: text/html
55

66
<html>
77
<head>
8-
<!-- Material Design fonts -->
9-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
10-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons">
118
<!-- Bootstrap -->
129
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
13-
<!-- Bootstrap Material Design -->
14-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/bootstrap-material-design.min.css">
15-
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/master/dist/css/ripples.min.css">
1610
<style>
1711
body {
1812
padding-top: 50px

0 commit comments

Comments
 (0)