[SECURITY] Disable HTTP server header (#946)

* [SECURITY] Disable HTTP Server Header

* alphabetize fasthttp.Server property assignment
pull/947/head
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
1 changed files with 5 additions and 4 deletions

View File

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