This commit is contained in:
Josh Soref 2024-09-13 05:40:04 -04:00 committed by GitHub
parent 71d4b3b13c
commit d547b943df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 48 additions and 48 deletions

View file

@ -8,7 +8,7 @@ on:
env: env:
GO_VERSION: '1.23' GO_VERSION: '1.23'
GOLANGCI_LINT_VERSION: v1.60.3 GOLANGCI_LINT_VERSION: v1.60.3
MISSSPELL_VERSION: v0.6.0 MISSPELL_VERSION: v0.6.0
jobs: jobs:
@ -29,8 +29,8 @@ jobs:
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
- name: Install missspell ${{ env.MISSSPELL_VERSION }} - name: Install misspell ${{ env.MISSPELL_VERSION }}
run: curl -sfL https://raw.githubusercontent.com/golangci/misspell/master/install-misspell.sh | sh -s -- -b $(go env GOPATH)/bin ${MISSSPELL_VERSION} run: curl -sfL https://raw.githubusercontent.com/golangci/misspell/master/install-misspell.sh | sh -s -- -b $(go env GOPATH)/bin ${MISSPELL_VERSION}
- name: Avoid generating webui - name: Avoid generating webui
run: touch webui/static/index.html run: touch webui/static/index.html

View file

@ -47,7 +47,7 @@ Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
When an inapropriate behavior is reported, maintainers will discuss on the Maintainer's Discord before marking the message as "abuse". When an inappropriate behavior is reported, maintainers will discuss on the Maintainer's Discord before marking the message as "abuse".
This conversation beforehand avoids one-sided decisions. This conversation beforehand avoids one-sided decisions.
The first message will be edited and marked as abuse. The first message will be edited and marked as abuse.

View file

@ -316,7 +316,7 @@ func setupServer(staticConfiguration *static.Configuration) (*server.Server, err
} }
if _, ok := resolverNames[rt.TLS.CertResolver]; !ok { if _, ok := resolverNames[rt.TLS.CertResolver]; !ok {
log.WithoutContext().Errorf("the router %s uses a non-existent resolver: %s", rtName, rt.TLS.CertResolver) log.WithoutContext().Errorf("Router %s uses a nonexistent resolver: %s", rtName, rt.TLS.CertResolver)
} }
} }
}) })

View file

@ -11,7 +11,7 @@ Automatic HTTPS
You can configure Traefik to use an ACME provider (like Let's Encrypt) for automatic certificate generation. You can configure Traefik to use an ACME provider (like Let's Encrypt) for automatic certificate generation.
!!! warning "Let's Encrypt and Rate Limiting" !!! warning "Let's Encrypt and Rate Limiting"
Note that Let's Encrypt API has [rate limiting](https://letsencrypt.org/docs/rate-limits). These last up to **one week**, and can not be overridden. Note that Let's Encrypt API has [rate limiting](https://letsencrypt.org/docs/rate-limits). These last up to **one week**, and cannot be overridden.
When running Traefik in a container this file should be persisted across restarts. When running Traefik in a container this file should be persisted across restarts.
If Traefik requests new certificates each time it starts up, a crash-looping container can quickly reach Let's Encrypt's ratelimits. If Traefik requests new certificates each time it starts up, a crash-looping container can quickly reach Let's Encrypt's ratelimits.

View file

@ -335,7 +335,7 @@ spec:
requestHost: true requestHost: true
``` ```
```yaml tab="Cosul Catalog" ```yaml tab="Consul Catalog"
- "traefik.http.middlewares.test-inflightreq.inflightreq.sourcecriterion.requesthost=true" - "traefik.http.middlewares.test-inflightreq.inflightreq.sourcecriterion.requesthost=true"
``` ```

View file

@ -429,7 +429,7 @@ For more advanced use cases, you can use either the [RedirectScheme middleware](
Following up on the deprecation started [previously](#x509-commonname-deprecation), Following up on the deprecation started [previously](#x509-commonname-deprecation),
as the `x509ignoreCN=0` value for the `GODEBUG` is [deprecated in Go 1.17](https://tip.golang.org/doc/go1.17#crypto/x509), as the `x509ignoreCN=0` value for the `GODEBUG` is [deprecated in Go 1.17](https://tip.golang.org/doc/go1.17#crypto/x509),
the legacy behavior related to the CommonName field can not be enabled at all anymore. the legacy behavior related to the CommonName field cannot be enabled at all anymore.
## v2.5.3 to v2.5.4 ## v2.5.3 to v2.5.4

View file

@ -33,7 +33,7 @@ traefik [--flag[=true|false| ]] [-f [true|false| ]]
All flags are documented in the [(static configuration) CLI reference](../reference/static-configuration/cli.md). All flags are documented in the [(static configuration) CLI reference](../reference/static-configuration/cli.md).
!!! info "Flags are case insensitive." !!! info "Flags are case-insensitive."
### `healthcheck` ### `healthcheck`

View file

@ -8,7 +8,7 @@ description: "View the reference for performing dynamic configurations with Trae
Dynamic configuration with Consul Catalog Dynamic configuration with Consul Catalog
{: .subtitle } {: .subtitle }
The labels are case insensitive. The labels are case-insensitive.
```yaml ```yaml
--8<-- "content/reference/dynamic-configuration/consul-catalog.yml" --8<-- "content/reference/dynamic-configuration/consul-catalog.yml"

View file

@ -8,7 +8,7 @@ description: "Reference dynamic configuration with Docker labels in Traefik Prox
Dynamic configuration with Docker Labels Dynamic configuration with Docker Labels
{: .subtitle } {: .subtitle }
The labels are case insensitive. The labels are case-insensitive.
```yaml ```yaml
labels: labels:

View file

@ -8,7 +8,7 @@ description: "Learn how to do dynamic configuration in Traefik Proxy with AWS EC
Dynamic configuration with ECS provider Dynamic configuration with ECS provider
{: .subtitle } {: .subtitle }
The labels are case insensitive. The labels are case-insensitive.
```yaml ```yaml
--8<-- "content/reference/dynamic-configuration/ecs.yml" --8<-- "content/reference/dynamic-configuration/ecs.yml"

View file

@ -8,7 +8,7 @@ description: "View the reference for performing dynamic configurations with Trae
Dynamic configuration with Nomad Service Discovery Dynamic configuration with Nomad Service Discovery
{: .subtitle } {: .subtitle }
The labels are case insensitive. The labels are case-insensitive.
```yaml ```yaml
--8<-- "content/reference/dynamic-configuration/nomad.yml" --8<-- "content/reference/dynamic-configuration/nomad.yml"

View file

@ -8,7 +8,7 @@ description: "Read the official Traefik documentation to learn more on dynamic c
Dynamic configuration with Rancher Labels Dynamic configuration with Rancher Labels
{: .subtitle } {: .subtitle }
The labels are case insensitive. The labels are case-insensitive.
```yaml ```yaml
labels: labels:

View file

@ -24,7 +24,7 @@ With Consul Catalog, Traefik can leverage tags attached to a service to generate
!!! info "tags" !!! info "tags"
- tags are case insensitive. - tags are case-insensitive.
- The complete list of tags can be found [the reference page](../../reference/dynamic-configuration/consul-catalog.md) - The complete list of tags can be found [the reference page](../../reference/dynamic-configuration/consul-catalog.md)
### General ### General

View file

@ -147,7 +147,7 @@ With Docker, Traefik can leverage labels attached to a container to generate rou
!!! info "Labels" !!! info "Labels"
- Labels are case insensitive. - Labels are case-insensitive.
- The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/docker.md). - The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/docker.md).
### General ### General

View file

@ -22,7 +22,7 @@ With ECS, Traefik can leverage labels attached to a container to generate routin
!!! info "labels" !!! info "labels"
- labels are case insensitive. - labels are case-insensitive.
- The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/ecs.md). - The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/ecs.md).
### General ### General

View file

@ -12,7 +12,7 @@ A Story of key & values
!!! info "Keys" !!! info "Keys"
- Keys are case insensitive. - Keys are case-insensitive.
- The complete list of keys can be found in [the reference page](../../reference/dynamic-configuration/kv.md). - The complete list of keys can be found in [the reference page](../../reference/dynamic-configuration/kv.md).
### Routers ### Routers

View file

@ -14,7 +14,7 @@ See also [Marathon user guide](../../user-guides/marathon.md).
!!! info "Labels" !!! info "Labels"
- Labels are case insensitive. - Labels are case-insensitive.
- The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/marathon.md). - The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/marathon.md).
### General ### General

View file

@ -24,7 +24,7 @@ With Nomad, Traefik can leverage tags attached to a service to generate routing
!!! info "tags" !!! info "tags"
- tags are case insensitive. - tags are case-insensitive.
- The complete list of tags can be found [the reference page](../../reference/dynamic-configuration/nomad.md) - The complete list of tags can be found [the reference page](../../reference/dynamic-configuration/nomad.md)
### General ### General

View file

@ -29,7 +29,7 @@ With Rancher, Traefik can leverage labels attached to a service to generate rout
!!! info "Labels" !!! info "Labels"
- Labels are case insensitive. - Labels are case-insensitive.
- The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/rancher.md). - The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/rancher.md).
### General ### General

View file

@ -259,7 +259,7 @@ The table below lists all the available matchers:
The regexp name (`name` in the above example) is an arbitrary value, that exists only for historical reasons. The regexp name (`name` in the above example) is an arbitrary value, that exists only for historical reasons.
Any `regexp` supported by [Go's regexp package](https://golang.org/pkg/regexp/) may be used. Any `regexp` supported by [Go's regexp package](https://golang.org/pkg/regexp/) may be used.
For example, here is a case insensitive path matcher syntax: ```Path(`/{path:(?i:Products)}`)```. For example, here is a case-insensitive path matcher syntax: ```Path(`/{path:(?i:Products)}`)```.
!!! info "Combining Matchers Using Operators and Parenthesis" !!! info "Combining Matchers Using Operators and Parenthesis"
@ -946,7 +946,7 @@ A value of `0` for the priority is ignored: `priority = 0` means that the defaul
| Router-2 | ```ClientIP(`192.168.0.0/24`)``` | 26 | | Router-2 | ```ClientIP(`192.168.0.0/24`)``` | 26 |
Which means that requests from `192.168.0.12` would go to Router-2 even though Router-1 is intended to specifically handle them. Which means that requests from `192.168.0.12` would go to Router-2 even though Router-1 is intended to specifically handle them.
To achieve this intention, a priority (higher than 26) should be set on Router-1. To achieve this intention, a priority (greater than 26) should be set on Router-1.
??? example "Setting priorities -- using the [File Provider](../../providers/file.md)" ??? example "Setting priorities -- using the [File Provider](../../providers/file.md)"

View file

@ -1,6 +1,6 @@
--- ---
title: "Traefik Docker DNS Challenge Documentation" title: "Traefik Docker DNS Challenge Documentation"
description: "Learn how to create a certificate with the Let's Encrypt DNS challenge to use HTTPS on a Service exposed with Traefik Proxy. Read the tehnical documentation." description: "Learn how to create a certificate with the Let's Encrypt DNS challenge to use HTTPS on a Service exposed with Traefik Proxy. Read the technical documentation."
--- ---
# Docker-compose with Let's Encrypt: DNS Challenge # Docker-compose with Let's Encrypt: DNS Challenge

View file

@ -48,7 +48,7 @@ openssl genrsa -out client3.key 2048
# Locality Name (eg, city) []:. # Locality Name (eg, city) []:.
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:. # Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
# Organizational Unit Name (eg, section) []:. # Organizational Unit Name (eg, section) []:.
# Common Name (e.g. server FQDN or YOUR name) []:clien1.example.com # Common Name (e.g. server FQDN or YOUR name) []:client1.example.com
# Email Address []:. # Email Address []:.
# #
# Please enter the following 'extra' attributes # Please enter the following 'extra' attributes
@ -58,7 +58,7 @@ openssl genrsa -out client3.key 2048
# Issuer # Issuer
# CN = ca1.example.com # CN = ca1.example.com
# Subject # Subject
# CN = clien1.example.com # CN = client1.example.com
openssl req -key client1.key -new -out client1.csr openssl req -key client1.key -new -out client1.csr
# Country Name (2 letter code) [AU]:. # Country Name (2 letter code) [AU]:.

View file

@ -27,7 +27,7 @@ const (
// Log rotation integration test suite. // Log rotation integration test suite.
type LogRotationSuite struct{ BaseSuite } type LogRotationSuite struct{ BaseSuite }
func TestLogRorationSuite(t *testing.T) { func TestLogRotationSuite(t *testing.T) {
suite.Run(t, new(LogRotationSuite)) suite.Run(t, new(LogRotationSuite))
} }

View file

@ -1288,7 +1288,7 @@ func (s *SimpleSuite) TestDebugLog() {
req, err := http.NewRequest(http.MethodGet, "http://localhost:8000/whoami", http.NoBody) req, err := http.NewRequest(http.MethodGet, "http://localhost:8000/whoami", http.NoBody)
require.NoError(s.T(), err) require.NoError(s.T(), err)
req.Header.Set("Autorization", "Bearer ThisIsABearerToken") req.Header.Set("Authorization", "Bearer ThisIsABearerToken")
response, err := http.DefaultClient.Do(req) response, err := http.DefaultClient.Do(req)
require.NoError(s.T(), err) require.NoError(s.T(), err)

View file

@ -19,7 +19,7 @@ const (
type timedAction func(timeout time.Duration, operation DoCondition) error type timedAction func(timeout time.Duration, operation DoCondition) error
// Sleep pauses the current goroutine for at least the duration d. // Sleep pauses the current goroutine for at least the duration d.
// Deprecated: Use only when use an other Try[...] functions is not possible. // Deprecated: Use only when use another Try[...] functions is not possible.
func Sleep(d time.Duration) { func Sleep(d time.Duration) {
d = applyCIMultiplier(d) d = applyCIMultiplier(d)
time.Sleep(d) time.Sleep(d)

View file

@ -70,8 +70,8 @@ func TestDecodeToNode(t *testing.T) {
{ {
desc: "several entries, level 0", desc: "several entries, level 0",
in: map[string]string{ in: map[string]string{
"traefik": "bar", "traefik": "bar",
"traefic": "bur", "traefik_": "bur",
}, },
expected: expected{error: true}, expected: expected{error: true},
}, },
@ -120,7 +120,7 @@ func TestDecodeToNode(t *testing.T) {
}}, }},
}, },
{ {
desc: "several entries, level 2, case insensitive", desc: "several entries, level 2, case-insensitive",
in: map[string]string{ in: map[string]string{
"traefik/foo/aaa": "bar", "traefik/foo/aaa": "bar",
"traefik/Foo/bbb": "bur", "traefik/Foo/bbb": "bur",

View file

@ -46,7 +46,7 @@ func TestDepthStrategy_GetIP(t *testing.T) {
expected: "10.0.0.3", expected: "10.0.0.3",
}, },
{ {
desc: "Use non existing depth in XForwardedFor", desc: "Use nonexistent depth in XForwardedFor",
depth: 2, depth: 2,
xForwardedFor: "", xForwardedFor: "",
expected: "", expected: "",

View file

@ -162,7 +162,7 @@ func TestLoggerHeaderFields(t *testing.T) {
}, },
}, },
{ {
desc: "with case insensitive match on header name", desc: "with case-insensitive match on header name",
header: "User-Agent", header: "User-Agent",
expected: types.AccessLogKeep, expected: types.AccessLogKeep,
accessLogFields: types.AccessLogFields{ accessLogFields: types.AccessLogFields{

View file

@ -249,7 +249,7 @@ func (cc *codeCatcher) Flush() {
// since we want to serve the ones from the error page, // since we want to serve the ones from the error page,
// so we just don't flush. // so we just don't flush.
// (e.g., To prevent superfluous WriteHeader on request with a // (e.g., To prevent superfluous WriteHeader on request with a
// `Transfert-Encoding: chunked` header). // `Transfer-Encoding: chunked` header).
if cc.caughtFilteredCode { if cc.caughtFilteredCode {
return return
} }

View file

@ -147,7 +147,7 @@ func (rl *rateLimiter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
// We Set even in the case where the source already exists, // We Set even in the case where the source already exists,
// because we want to update the expiryTime everytime we get the source, // because we want to update the expiryTime every time we get the source,
// as the expiryTime is supposed to reflect the activity (or lack thereof) on that source. // as the expiryTime is supposed to reflect the activity (or lack thereof) on that source.
if err := rl.buckets.Set(source, bucket, rl.ttl); err != nil { if err := rl.buckets.Set(source, bucket, rl.ttl); err != nil {
logger.Errorf("could not insert/update bucket: %v", err) logger.Errorf("could not insert/update bucket: %v", err)

View file

@ -728,7 +728,7 @@ func deleteUnnecessaryDomains(ctx context.Context, domains []types.Domain) []typ
} }
// Check if CN or SANS to check already exists // Check if CN or SANS to check already exists
// or can not be checked by a wildcard // or cannot be checked by a wildcard
var newDomainsToCheck []string var newDomainsToCheck []string
for _, domainProcessed := range domainToCheck.ToStrArray() { for _, domainProcessed := range domainToCheck.ToStrArray() {
if idxDomain < idxDomainToCheck && isDomainAlreadyChecked(domainProcessed, domain.ToStrArray()) { if idxDomain < idxDomainToCheck && isDomainAlreadyChecked(domainProcessed, domain.ToStrArray()) {

View file

@ -205,7 +205,7 @@ func withEndpointSpec(ops ...func(*swarm.EndpointSpec)) func(*swarm.Service) {
} }
} }
func modeDNSSR(spec *swarm.EndpointSpec) { func modeDNSRR(spec *swarm.EndpointSpec) {
spec.Mode = swarm.ResolutionModeDNSRR spec.Mode = swarm.ResolutionModeDNSRR
} }

View file

@ -3870,7 +3870,7 @@ func TestSwarmGetIPAddress(t *testing.T) {
networks map[string]*network.Summary networks map[string]*network.Summary
}{ }{
{ {
service: swarmService(withEndpointSpec(modeDNSSR)), service: swarmService(withEndpointSpec(modeDNSRR)),
expected: "", expected: "",
networks: map[string]*network.Summary{}, networks: map[string]*network.Summary{},
}, },
@ -3935,7 +3935,7 @@ func TestSwarmGetPort(t *testing.T) {
}{ }{
{ {
service: swarmService( service: swarmService(
withEndpointSpec(modeDNSSR), withEndpointSpec(modeDNSRR),
), ),
networks: map[string]*network.Summary{}, networks: map[string]*network.Summary{},
serverPort: "8080", serverPort: "8080",

View file

@ -156,7 +156,7 @@ func TestListServices(t *testing.T) {
"traefik.docker.network": "barnet", "traefik.docker.network": "barnet",
"traefik.docker.LBSwarm": "true", "traefik.docker.LBSwarm": "true",
}), }),
withEndpointSpec(modeDNSSR)), withEndpointSpec(modeDNSRR)),
}, },
dockerVersion: "1.30", dockerVersion: "1.30",
networks: []network.Summary{}, networks: []network.Summary{},
@ -182,7 +182,7 @@ func TestListServices(t *testing.T) {
"traefik.docker.network": "barnet", "traefik.docker.network": "barnet",
"traefik.docker.LBSwarm": "true", "traefik.docker.LBSwarm": "true",
}), }),
withEndpointSpec(modeDNSSR)), withEndpointSpec(modeDNSRR)),
}, },
dockerVersion: "1.30", dockerVersion: "1.30",
networks: []network.Summary{ networks: []network.Summary{
@ -227,7 +227,7 @@ func TestListServices(t *testing.T) {
serviceLabels(map[string]string{ serviceLabels(map[string]string{
"traefik.docker.network": "barnet", "traefik.docker.network": "barnet",
}), }),
withEndpointSpec(modeDNSSR)), withEndpointSpec(modeDNSRR)),
}, },
tasks: []swarm.Task{ tasks: []swarm.Task{
swarmTask("id1", swarmTask("id1",

View file

@ -786,7 +786,7 @@ func TestDo_staticConfiguration(t *testing.T) {
} }
config.Providers.HTTP = &http.Provider{ config.Providers.HTTP = &http.Provider{
Endpoint: "Myenpoint", Endpoint: "Myendpoint",
PollInterval: 42, PollInterval: 42,
PollTimeout: 42, PollTimeout: 42,
TLS: &types.ClientTLS{ TLS: &types.ClientTLS{

View file

@ -986,7 +986,7 @@ func BenchmarkService(b *testing.B) {
LoadBalancer: &dynamic.ServersLoadBalancer{ LoadBalancer: &dynamic.ServersLoadBalancer{
Servers: []dynamic.Server{ Servers: []dynamic.Server{
{ {
URL: "tchouck", URL: "tchouk",
}, },
}, },
}, },

View file

@ -47,7 +47,7 @@ func TestGetBestCertificate(t *testing.T) {
expectedCert: "*.snitest.com", expectedCert: "*.snitest.com",
}, },
{ {
desc: "Best Match with dynamic wildcard only, case insensitive", desc: "Best Match with dynamic wildcard only, case-insensitive",
domainToCheck: "bar.www.snitest.com", domainToCheck: "bar.www.snitest.com",
dynamicCert: "*.www.snitest.com", dynamicCert: "*.www.snitest.com",
expectedCert: "*.www.snitest.com", expectedCert: "*.www.snitest.com",

View file

@ -137,7 +137,7 @@ func TestMatchDomain(t *testing.T) {
expected: true, expected: true,
}, },
{ {
desc: "dot replaced by a cahr", desc: "dot replaced by a char",
certDomain: "sub.sub.traefik.wtf", certDomain: "sub.sub.traefik.wtf",
domain: "sub.sub.traefikiwtf", domain: "sub.sub.traefikiwtf",
expected: false, expected: false,

View file

@ -129,7 +129,7 @@
align="left" align="left"
icon="eva-github-outline" icon="eva-github-outline"
no-caps no-caps
label="Github repository" label="GitHub repository"
class="btn-submenu full-width" class="btn-submenu full-width"
/> />
</q-item> </q-item>