@@ -65,10 +65,10 @@ will not run.
6565//handlerWithMiddleware is handler wrapped with middleware to serve the prechecks at endpoint
6666func handlerWithMiddleware (handle http.HandlerFunc ) http.HandlerFunc {
6767 return requestContentType (
68- contentLength (
69- postOnly (handle ),
70- ),
71- )
68+ contentLength (
69+ postOnly (handle ),
70+ ),
71+ )
7272}
7373
7474//error handler deals with requests sent to an invalid endpoint and returns a 404.
@@ -93,7 +93,7 @@ func checkSymLinks(filename string) error {
9393// StartServer starts the HTTP server needed for scheduler.
9494// It registers the handlers and checks for existing telemetry policies.
9595func (m Server ) StartServer (port string , certFile string , keyFile string , caFile string , unsafe bool ) {
96- mx := http .NewServeMux ()
96+ mx := http .NewServeMux ()
9797 mx .HandleFunc ("/" , handlerWithMiddleware (errorHandler ))
9898 mx .HandleFunc ("/scheduler/prioritize" , handlerWithMiddleware (m .Prioritize ))
9999 mx .HandleFunc ("/scheduler/filter" , handlerWithMiddleware (m .Filter ))
@@ -132,13 +132,13 @@ func configureSecureServer(port string, caFile string) *http.Server {
132132 caCertPool .AppendCertsFromPEM (caCert )
133133
134134 cfg := & tls.Config {
135- MinVersion : tls .VersionTLS12 ,
136- CurvePreferences : []tls.CurveID {tls .CurveP521 , tls .CurveP384 , tls .CurveP256 },
137- ClientCAs : caCertPool ,
138- ClientAuth : tls .RequireAndVerifyClientCert ,
139- PreferServerCipherSuites : true ,
140- InsecureSkipVerify : false ,
141- CipherSuites : []uint16 {
135+ MinVersion : tls .VersionTLS12 ,
136+ CurvePreferences : []tls.CurveID {tls .CurveP521 , tls .CurveP384 , tls .CurveP256 },
137+ ClientCAs : caCertPool ,
138+ ClientAuth : tls .RequireAndVerifyClientCert ,
139+ PreferServerCipherSuites : true ,
140+ InsecureSkipVerify : false ,
141+ CipherSuites : []uint16 {
142142 // tls 1.2
143143 tls .TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,
144144 tls .TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ,
0 commit comments