[SECURITY] Disable HTTP server header (#946)

* [SECURITY] Disable HTTP Server Header

* alphabetize fasthttp.Server property assignment
This commit is contained in:
James Elliott 2020-04-30 13:16:41 +10:00 committed by GitHub
parent c9e8a924e0
commit 2437f989cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,10 +115,11 @@ func StartServer(configuration schema.Configuration, providers middlewares.Provi
router.NotFound = ServeIndex(embeddedAssets)
server := &fasthttp.Server{
Handler: middlewares.LogRequestMiddleware(router.Handler),
ErrorHandler: autheliaErrorHandler,
ReadBufferSize: configuration.Server.ReadBufferSize,
WriteBufferSize: configuration.Server.WriteBufferSize,
ErrorHandler: autheliaErrorHandler,
Handler: middlewares.LogRequestMiddleware(router.Handler),
NoDefaultServerHeader: true,
ReadBufferSize: configuration.Server.ReadBufferSize,
WriteBufferSize: configuration.Server.WriteBufferSize,
}
addrPattern := fmt.Sprintf("%s:%d", configuration.Host, configuration.Port)