[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,8 +115,9 @@ 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),
NoDefaultServerHeader: true,
ReadBufferSize: configuration.Server.ReadBufferSize, ReadBufferSize: configuration.Server.ReadBufferSize,
WriteBufferSize: configuration.Server.WriteBufferSize, WriteBufferSize: configuration.Server.WriteBufferSize,
} }