golangci-lint update, ci cleanup, group dependabot updates (#11071)
* bump golangci-lint to v1.56.x Signed-off-by: cpanato <ctadeu@gmail.com> * cleanup empty lines Signed-off-by: cpanato <ctadeu@gmail.com> * group dependabot updates Signed-off-by: cpanato <ctadeu@gmail.com> * run on job changes as well Signed-off-by: cpanato <ctadeu@gmail.com> * remove deprecated checks Signed-off-by: cpanato <ctadeu@gmail.com> * fix lints and format Signed-off-by: cpanato <ctadeu@gmail.com> --------- Signed-off-by: cpanato <ctadeu@gmail.com>
This commit is contained in:
parent
0e11470ef3
commit
12fbe9b163
45 changed files with 96 additions and 100 deletions
|
|
@ -497,7 +497,7 @@ func buildResolvers(res, disableIpv6 interface{}) string {
|
|||
}
|
||||
|
||||
func needsRewrite(location *ingress.Location) bool {
|
||||
if len(location.Rewrite.Target) > 0 && location.Rewrite.Target != location.Path {
|
||||
if location.Rewrite.Target != "" && location.Rewrite.Target != location.Path {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
@ -771,10 +771,10 @@ func buildProxyPass(_ string, b, loc interface{}) string {
|
|||
return defProxyPass
|
||||
}
|
||||
|
||||
if len(location.Rewrite.Target) > 0 {
|
||||
if location.Rewrite.Target != "" {
|
||||
var xForwardedPrefix string
|
||||
|
||||
if len(location.XForwardedPrefix) > 0 {
|
||||
if location.XForwardedPrefix != "" {
|
||||
xForwardedPrefix = fmt.Sprintf("%s X-Forwarded-Prefix %q;\n", proxySetHeader(location), location.XForwardedPrefix)
|
||||
}
|
||||
|
||||
|
|
@ -1738,7 +1738,7 @@ func buildCorsOriginRegex(corsOrigins []string) string {
|
|||
originsRegex := "if ($http_origin ~* ("
|
||||
for i, origin := range corsOrigins {
|
||||
originTrimmed := strings.TrimSpace(origin)
|
||||
if len(originTrimmed) > 0 {
|
||||
if originTrimmed != "" {
|
||||
builtOrigin := buildOriginRegex(originTrimmed)
|
||||
originsRegex += builtOrigin
|
||||
if i != len(corsOrigins)-1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue