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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user