You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/feedback-and-contribution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Feedback and Contribution
2
2
3
-
The *Docker Flow: Proxy* project welcomes, and depends, on contributions from developers and users in the open source community. Contributions can be made in a number of ways, a few examples are:
3
+
The *Docker Flow Proxy* project welcomes, and depends, on contributions from developers and users in the open source community. Contributions can be made in a number of ways, a few examples are:
4
4
5
5
* Code patches or new features via pull requests
6
6
* Documentation improvements
@@ -20,7 +20,7 @@ Please join the [DevOps20](http://slack.devops20toolkit.com/) Slack channel if y
20
20
21
21
## Contributing To The Project
22
22
23
-
I encourage you to contribute to the *Docker Flow: Proxy* project.
23
+
I encourage you to contribute to the *Docker Flow Proxy* project.
24
24
25
25
The project is developed using *Test Driven Development* and *Continuous Deployment* process. Test are divided into unit and integration tests. Every code file has an equivalent with tests (e.g. `reconfigure.go` and `reconfigure_test.go`). Ideally, I expect you to write a test that defines that should be developed, run all the unit tests and confirm that the test fails, write just enough code to make the test pass, repeat. If you are new to testing, feel free to create a pull request indicating that tests are missing and I'll help you out.
|aclName |ACLs are ordered alphabetically by their names. If not specified, serviceName is used instead.|No ||05-go-demo-acl|
18
+
|addHeader |Additional headers that will be added to the request before forwarding it to the service. Multiple headers should be separated with comma (`,`). Please consult [Add a header to the request](https://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#add-a-header-to-the-request) for more info.|No||X-Forwarded-Port %[dst_port],X-Forwarded-Ssl on if { ssl_fc }|
18
19
|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.|No||443|
19
20
|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).|Only in `swarm` mode||8080|
20
21
|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.|No|http|tcp|
@@ -23,6 +24,7 @@ The following query parameters can be used to send a *reconfigure* request to *D
23
24
|serviceDomain |The domain of the service. If set, the proxy will allow access only to requests coming to that domain. Multiple domains should be separated with comma (`,`).|No||ecme.com|
24
25
|serviceDomainMatchAll|Whether to include subdomains and FDQN domains in the match. If set to false, and, for example, `serviceDomain` is set to `acme.com`, `something.acme.com` would not be considered a match unless this parameter is set to `true`. If this option is used, it is recommended to put any subdomains higher in the list using `aclName`.|No|false|true|
25
26
|serviceName |The name of the service. It must match the name of the Swarm service or the one stored in Consul.|Yes||go-demo |
27
+
|setHeader |Additional headers that will be set to the request before forwarding it to the service. If a specified header exists, it will be replaced with the new one. Multiple headers should be separated with comma (`,`). Please consult [Set a header to the request](https://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#set-a-header-in-the-request) for more info.|No||X-Forwarded-Port %[dst_port],X-Forwarded-Ssl on if { ssl_fc }|
26
28
|srcPort |The source (entry) port of a service. Useful only when specifying multiple destinations of a single service. The parameter can be prefixed with an index thus allowing definition of multiple destinations for a single service (e.g. `srcPort.1`, `srcPort.2`, and so on).|No||80|
27
29
|timeoutServer |The server timeout in seconds. |No |20 |60 |
28
30
|timeoutTunnel |The tunnel timeout in seconds. |No |3600 |1800 |
@@ -95,6 +97,7 @@ The map between the HTTP query parameters and environment variables is as follow
95
97
|Query |Environment variable |
96
98
|---------------------|------------------------|
97
99
|aclName |ACL_NAME |
100
+
|addHeader |ADD_HEADER |
98
101
|consulTemplateBePath |CONSUL_TEMPLATE_BE_PATH |
99
102
|consulTemplateFePath |CONSUL_TEMPLATE_FE_PATH |
100
103
|distribute |DISTRIBUTE |
@@ -112,6 +115,7 @@ The map between the HTTP query parameters and environment variables is as follow
Copy file name to clipboardExpand all lines: proxy/types.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ type ServiceDest struct {
20
20
}
21
21
22
22
typeServicestruct {
23
+
// Additional headers that will be added to the request before forwarding it to the service. Please consult https://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#add-a-header-to-the-request for more info.
24
+
AddHeader []string`split_words:"true"`
23
25
// ACLs are ordered alphabetically by their names.
24
26
// If not specified, serviceName is used instead.
25
27
AclNamestring`split_words:"true"`
@@ -69,6 +71,8 @@ type Service struct {
69
71
// The name of the service.
70
72
// It must match the name of the Swarm service or the one stored in Consul.
71
73
ServiceNamestring`split_words:"true"`
74
+
// Additional headers that will be set to the request before forwarding it to the service. If a specified header exists, it will be replaced with the new one.
0 commit comments