Merge remote-tracking branch 'upstream/v2.1' into v2.2

This commit is contained in:
Fernandez Ludovic 2020-03-18 18:12:24 +01:00
commit 2b28607a4e
10 changed files with 41 additions and 10 deletions

View file

@ -34,8 +34,10 @@ builds:
goarch: 386
- goos: openbsd
goarch: arm
- goos: openbsd
goarch: arm64
- goos: freebsd
goarch: arm
goarch: arm64
changelog:
skip: true

View file

@ -1,3 +1,16 @@
## [v2.1.7](https://github.com/containous/traefik/tree/v2.1.7) (2020-03-18)
[All Commits](https://github.com/containous/traefik/compare/v2.1.6...v2.1.7)
**Bug fixes:**
- **[logs,middleware]** Access log field quotes. ([#6484](https://github.com/containous/traefik/pull/6484) by [ldez](https://github.com/ldez))
- **[metrics]** fix statsd scale for duration based metrics ([#6054](https://github.com/containous/traefik/pull/6054) by [ddtmachado](https://github.com/ddtmachado))
- **[middleware]** Added support for replacement containing escaped characters ([#6413](https://github.com/containous/traefik/pull/6413) by [rtribotte](https://github.com/rtribotte))
**Documentation:**
- **[acme,docker]** Add some missing doc. ([#6422](https://github.com/containous/traefik/pull/6422) by [ldez](https://github.com/ldez))
- **[acme]** Added wildcard ACME example ([#6423](https://github.com/containous/traefik/pull/6423) by [Basster](https://github.com/Basster))
- **[acme]** fix typo ([#6408](https://github.com/containous/traefik/pull/6408) by [hamiltont](https://github.com/hamiltont))
## [v2.2.0-rc2](https://github.com/containous/traefik/tree/v2.2.0-rc2) (2020-03-11)
[All Commits](https://github.com/containous/traefik/compare/v2.2.0-rc1...v2.2.0-rc2)

View file

@ -35,7 +35,7 @@ If the given format is unsupported, the default (CLF) is used instead.
!!! info "Common Log Format"
```html
<remote_IP_address> - <client_user_name_if_available> [<timestamp>] "<request_method> <request_path> <request_protocol>" <origin_server_HTTP_status> <origin_server_content_size> "<request_referrer>" "<request_user_agent>" <number_of_requests_received_since_Traefik_started> "<Traefik_frontend_name>" "<Traefik_backend_URL>" <request_duration_in_ms>ms
<remote_IP_address> - <client_user_name_if_available> [<timestamp>] "<request_method> <request_path> <request_protocol>" <origin_server_HTTP_status> <origin_server_content_size> "<request_referrer>" "<request_user_agent>" <number_of_requests_received_since_Traefik_started> "<Traefik_router_name>" "<Traefik_server_URL>" <request_duration_in_ms>ms
```
### `bufferingSize`

View file

@ -105,6 +105,12 @@ HTTP configuration.
`--entrypoints.<name>.http.middlewares`:
Default middlewares for the routers linked to the entry point.
`--entrypoints.<name>.http.redirections.entrypoint.permanent`:
Applied a permanent redirection. Defaults to true. (Default: ```true```)
`--entrypoints.<name>.http.redirections.entrypoint.priority`:
Priority of the generated router. Defaults to 1. (Default: ```1```)
`--entrypoints.<name>.http.redirections.entrypoint.scheme`:
Scheme used for the redirection. Defaults to https. (Default: ```https```)

View file

@ -105,6 +105,12 @@ HTTP configuration.
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_MIDDLEWARES`:
Default middlewares for the routers linked to the entry point.
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_PERMANENT`:
Applied a permanent redirection. Defaults to true. (Default: ```true```)
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_PRIORITY`:
Priority of the generated router. Defaults to 1. (Default: ```1```)
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME`:
Scheme used for the redirection. Defaults to https. (Default: ```https```)

View file

@ -34,6 +34,8 @@
[entryPoints.EntryPoint0.http.redirections.entryPoint]
to = "foobar"
scheme = "foobar"
permanent = true
priority = 42
[entryPoints.EntryPoint0.http.tls]
options = "foobar"
certResolver = "foobar"

View file

@ -37,6 +37,8 @@ entryPoints:
entryPoint:
to: foobar
scheme: foobar
permanent: true
priority: 42
middlewares:
- foobar
- foobar

View file

@ -45,8 +45,8 @@ func (f *CommonLogFormatter) Format(entry *logrus.Entry) ([]byte, error) {
toLog(entry.Data, "request_Referer", `"-"`, true),
toLog(entry.Data, "request_User-Agent", `"-"`, true),
toLog(entry.Data, RequestCount, defaultValue, true),
toLog(entry.Data, RouterName, defaultValue, true),
toLog(entry.Data, ServiceURL, defaultValue, true),
toLog(entry.Data, RouterName, `"-"`, true),
toLog(entry.Data, ServiceURL, `"-"`, true),
elapsedMillis)
return b.Bytes(), err

View file

@ -36,7 +36,7 @@ func TestCommonLogFormatter_Format(t *testing.T) {
RouterName: "",
ServiceURL: "",
},
expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - "-" "-" 0 - - 123000ms
expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - "-" "-" 0 "-" "-" 123000ms
`,
},
{

View file

@ -497,7 +497,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
DefaultMode: "drop",
},
},
expectedLog: `- - - [-] "- - -" - - "testReferer" "testUserAgent" - - - 0ms`,
expectedLog: `- - - [-] "- - -" - - "testReferer" "testUserAgent" - "-" "-" 0ms`,
},
{
desc: "Default mode drop with override",
@ -512,7 +512,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
},
},
},
expectedLog: `- - TestUser [-] "- - -" - - "testReferer" "testUserAgent" - - - 0ms`,
expectedLog: `- - TestUser [-] "- - -" - - "testReferer" "testUserAgent" - "-" "-" 0ms`,
},
{
desc: "Default mode drop with header dropped",
@ -530,7 +530,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
},
},
},
expectedLog: `- - TestUser [-] "- - -" - - "-" "-" - - - 0ms`,
expectedLog: `- - TestUser [-] "- - -" - - "-" "-" - "-" "-" 0ms`,
},
{
desc: "Default mode drop with header redacted",
@ -548,7 +548,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
},
},
},
expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "REDACTED" - - - 0ms`,
expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "REDACTED" - "-" "-" 0ms`,
},
{
desc: "Default mode drop with header redacted",
@ -569,7 +569,7 @@ func TestNewLogHandlerOutputStdout(t *testing.T) {
},
},
},
expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "testUserAgent" - - - 0ms`,
expectedLog: `- - TestUser [-] "- - -" - - "REDACTED" "testUserAgent" - "-" "-" 0ms`,
},
}