diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/oauth/oauth.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/oauth/oauth.go b/internal/oauth/oauth.go index f88e7e9..6fd2c1f 100644 --- a/internal/oauth/oauth.go +++ b/internal/oauth/oauth.go @@ -187,6 +187,9 @@ func (oauth *OAuth) tokensWithCallback() error { // server /callback over the listener address oauth.session.Server = &http.Server{ Handler: mux, + // Define a default 60 second header read timeout to protect against a Slowloris Attack + // A bit overkill maybe for a local server but good to define anyways + ReadHeaderTimeout: 60 * time.Second, } mux.HandleFunc("/callback", oauth.Callback) |
