From 8128d6ca2687b904eb8399bab74841d0bddfef63 Mon Sep 17 00:00:00 2001 From: sosoba Date: Tue, 18 Oct 2022 15:38:12 +0200 Subject: [PATCH 1/4] Simplify dashboard rule example --- docs/content/operations/dashboard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/operations/dashboard.md b/docs/content/operations/dashboard.md index af1ce1058..c838f0afd 100644 --- a/docs/content/operations/dashboard.md +++ b/docs/content/operations/dashboard.md @@ -93,12 +93,12 @@ rule = "Host(`traefik.example.com`)" ```bash tab="Path Prefix Rule" # The dashboard can be accessed on http://example.com/dashboard/ or http://traefik.example.com/dashboard/ -rule = "PathPrefix(`/api`) || PathPrefix(`/dashboard`)" +rule = "PathPrefix(`/api`, `/dashboard`)" ``` ```bash tab="Combination of Rules" # The dashboard can be accessed on http://traefik.example.com/dashboard/ -rule = "Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" +rule = "Host(`traefik.example.com`) && PathPrefix(`/api`, `/dashboard`)" ``` ??? example "Dashboard Dynamic Configuration Examples" From be3b798dd6bdc44c5e468ac17810807d5cbbad29 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Fri, 21 Oct 2022 16:08:05 +0200 Subject: [PATCH 2/4] chore: update actions/cache to v3 --- .github/workflows/build.yaml | 2 +- .github/workflows/test-unit.yaml | 2 +- .github/workflows/validate.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fd6f61dc0..110edf6cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -56,7 +56,7 @@ jobs: fetch-depth: 0 - name: Cache Go modules - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/go/pkg/mod diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index cbc2eb57d..c819cd1aa 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -31,7 +31,7 @@ jobs: fetch-depth: 0 - name: Cache Go modules - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/go/pkg/mod diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 9cb143d8b..beb87eec1 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: Cache Go modules - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/go/pkg/mod @@ -73,7 +73,7 @@ jobs: fetch-depth: 0 - name: Cache Go modules - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/go/pkg/mod From 93212125e3f95893d4aaa726275344d329fcaf69 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sun, 23 Oct 2022 14:16:05 +0200 Subject: [PATCH 3/4] chore: bump github.com/BurntSushi/toml to v1.2.1 --- .golangci.yml | 1 - go.mod | 5 +---- go.sum | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8267a2b94..87e90c964 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -75,7 +75,6 @@ linters-settings: - github.com/mailgun/minheap - github.com/mailgun/multibuf - github.com/jaguilar/vt100 - - github.com/BurntSushi/toml linters: enable-all: true diff --git a/go.mod b/go.mod index a153b1af6..94e122e67 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/traefik/traefik/v2 go 1.19 require ( - github.com/BurntSushi/toml v1.2.0 + github.com/BurntSushi/toml v1.2.1 github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61 github.com/Masterminds/sprig/v3 v3.2.2 github.com/abbot/go-http-auth v0.0.0-00010101000000-000000000000 @@ -354,9 +354,6 @@ replace ( // https://github.com/docker/compose/blob/e44222664abd07ce1d1fe6796d84d93cbc7468c3/go.mod#L131 replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 -// https://github.com/BurntSushi/toml/issues/360 -replace github.com/BurntSushi/toml v1.2.0 => github.com/BurntSushi/toml v1.1.0 - // ambiguous import: found package github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http in multiple modules // tencentcloud uses monorepo with multimodule but the go.mod files are incomplete. exclude github.com/tencentcloud/tencentcloud-sdk-go v3.0.83+incompatible diff --git a/go.sum b/go.sum index c644b5edc..568b63f0b 100644 --- a/go.sum +++ b/go.sum @@ -112,8 +112,8 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583 h1:3nVO1nQyh64IUY6BPZUpMYMZ738Pu+LsMt3E0eqqIYw= github.com/DataDog/datadog-agent/pkg/obfuscate v0.0.0-20211129110424-6491aa3bf583/go.mod h1:EP9f4GqaDJyP1F5jTNMtzdIpw3JpNs3rMSJOnYywCiw= From ccbbd0d76686e2f8b008852d89c48c50ec5b58bb Mon Sep 17 00:00:00 2001 From: Simon Delicata Date: Mon, 24 Oct 2022 10:52:04 +0200 Subject: [PATCH 4/4] Remove side effect on default transport tests --- pkg/server/service/proxy_websocket_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/server/service/proxy_websocket_test.go b/pkg/server/service/proxy_websocket_test.go index 8b58cf94a..84e6a1aef 100644 --- a/pkg/server/service/proxy_websocket_test.go +++ b/pkg/server/service/proxy_websocket_test.go @@ -593,9 +593,11 @@ func TestWebSocketTransferTLSConfig(t *testing.T) { require.NoError(t, err) assert.Equal(t, "ok", resp) - http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + // Don't alter default transport to prevent side effects on other tests. + defaultTransport := http.DefaultTransport.(*http.Transport).Clone() + defaultTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - forwarderWithTLSConfigFromDefaultTransport, err := buildProxy(Bool(true), nil, http.DefaultTransport, nil) + forwarderWithTLSConfigFromDefaultTransport, err := buildProxy(Bool(true), nil, defaultTransport, nil) require.NoError(t, err) proxyWithTLSConfigFromDefaultTransport := createProxyWithForwarder(t, forwarderWithTLSConfigFromDefaultTransport, srv.URL)