Skip to content
Snippets Groups Projects
Commit 999dba95 authored by Lars Thoms's avatar Lars Thoms
Browse files

:rotating_light: fixed 'potential Slowloris Attack'

Because ReadHeaderTimeout was not configured in the http.Server
parent 98913f4d
Branches
Tags 2.0.2
No related merge requests found
......@@ -157,10 +157,12 @@ deploy:
artifacts: true
- job: build-go-debian
artifacts: true
before_script:
- apk add --no-cache curl
script:
- >-
for FILE in bin/*; do
curl -H "JOB-TOKEN: ${CI_JOB_TOKEN}" -T "${FILE}" "${PACKAGES_URL}/${FILE}"
curl -H "JOB-TOKEN: ${CI_JOB_TOKEN}" -T "${FILE}" "${PACKAGES_URL}/$(basename ${FILE})"
done
rules:
- if: $CI_COMMIT_TAG
......
......@@ -20,7 +20,11 @@ func Run() {
gin.SetMode(gin.ReleaseMode)
}
server := &http.Server{Addr: fmt.Sprintf("%s:%d", viper.GetString("server.listen"), viper.GetInt("server.port")), Handler: router}
server := &http.Server{
Addr: fmt.Sprintf("%s:%d", viper.GetString("server.listen"), viper.GetInt("server.port")),
Handler: router,
ReadHeaderTimeout: time.Minute,
}
terminator.WaitGroup.Add(1)
go func() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment