chore: implement Phase 1 and 2 security remediations
Some checks failed
Automated Container Build / build-and-push (push) Has been cancelled

This commit is contained in:
Elijah 2026-05-26 13:32:09 -07:00
parent 82731e93b1
commit 701766b611
14 changed files with 213 additions and 55 deletions

View file

@ -0,0 +1,19 @@
package handlers
import (
"net/http"
"time"
)
// SafeHTTPClient is a shared client for all outbound requests.
// It enforces timeouts and prevents indefinite hangs.
var SafeHTTPClient = &http.Client{
Timeout: 30 * time.Second,
Transport: &http.Transport{
TLSHandshakeTimeout: 10 * time.Second,
ResponseHeaderTimeout: 15 * time.Second,
IdleConnTimeout: 30 * time.Second,
MaxIdleConns: 10,
DisableKeepAlives: false,
},
}