update golangci-lint to v1.24 on github workflow (#40)

* update golangci-lint to v1.24 on github workflow

* fix lint errors
This commit is contained in:
César Nieto
2020-04-06 16:04:18 -07:00
committed by GitHub
parent 9ca4daa906
commit 775874cf86
7 changed files with 30 additions and 32 deletions

View File

@@ -126,27 +126,27 @@ func setupGlobalMiddleware(handler http.Handler) http.Handler {
// Secure middleware, this middleware wrap all the previous handlers and add
// HTTP security headers
secureOptions := secure.Options{
AllowedHosts: getSecureAllowedHosts(),
AllowedHostsAreRegex: getSecureAllowedHostsAreRegex(),
HostsProxyHeaders: getSecureHostsProxyHeaders(),
SSLRedirect: getSSLRedirect(),
SSLHost: getSecureSSLHost(),
STSSeconds: getSecureSTSSeconds(),
STSIncludeSubdomains: getSecureSTSIncludeSubdomains(),
STSPreload: getSecureSTSPreload(),
SSLTemporaryRedirect: getSecureSSLTemporaryRedirect(),
SSLHostFunc: nil,
ForceSTSHeader: getSecureForceSTSHeader(),
FrameDeny: getSecureFrameDeny(),
ContentTypeNosniff: getSecureContentTypeNonSniff(),
BrowserXssFilter: getSecureBrowserXssFilter(),
ContentSecurityPolicy: getSecureContentSecurityPolicy(),
AllowedHosts: getSecureAllowedHosts(),
AllowedHostsAreRegex: getSecureAllowedHostsAreRegex(),
HostsProxyHeaders: getSecureHostsProxyHeaders(),
SSLRedirect: getSSLRedirect(),
SSLHost: getSecureSSLHost(),
STSSeconds: getSecureSTSSeconds(),
STSIncludeSubdomains: getSecureSTSIncludeSubdomains(),
STSPreload: getSecureSTSPreload(),
SSLTemporaryRedirect: getSecureSSLTemporaryRedirect(),
SSLHostFunc: nil,
ForceSTSHeader: getSecureForceSTSHeader(),
FrameDeny: getSecureFrameDeny(),
ContentTypeNosniff: getSecureContentTypeNonSniff(),
BrowserXssFilter: getSecureBrowserXSSFilter(),
ContentSecurityPolicy: getSecureContentSecurityPolicy(),
ContentSecurityPolicyReportOnly: getSecureContentSecurityPolicyReportOnly(),
PublicKey: getSecurePublicKey(),
ReferrerPolicy: getSecureReferrerPolicy(),
FeaturePolicy: getSecureFeaturePolicy(),
ExpectCTHeader: getSecureExpectCTHeader(),
IsDevelopment: !getProductionMode(),
PublicKey: getSecurePublicKey(),
ReferrerPolicy: getSecureReferrerPolicy(),
FeaturePolicy: getSecureFeaturePolicy(),
ExpectCTHeader: getSecureExpectCTHeader(),
IsDevelopment: !getProductionMode(),
}
secureMiddleware := secure.New(secureOptions)
app := secureMiddleware.Handler(next)