Enhance SteamCache configuration and HTTP client settings
All checks were successful
Release Tag / release (push) Successful in 14s

- Added upstream server configuration to launch.json for improved connectivity.
- Increased HTTP client timeout from 60s to 120s for better handling of slow responses.
- Updated server timeouts in steamcache.go: increased ReadTimeout to 30s and WriteTimeout to 60s.
- Introduced ReadHeaderTimeout to mitigate header attacks and set MaxHeaderBytes to 1MB.
- Improved error logging in the Run method to include HTTP status codes for better debugging.
- Adjusted ServeHTTP method to handle root path and metrics endpoint correctly.
This commit is contained in:
2025-07-19 04:40:05 -05:00
parent d94b53c395
commit ae013f9a3b
2 changed files with 26 additions and 12 deletions

6
.vscode/launch.json vendored
View File

@@ -23,6 +23,8 @@
"lru",
"--log-level",
"debug",
"--upstream",
"http://192.168.2.5:80",
],
},
{
@@ -40,6 +42,8 @@
"hybrid",
"--log-level",
"debug",
"--upstream",
"http://192.168.2.5:80",
],
},
{
@@ -55,6 +59,8 @@
"lfu",
"--log-level",
"debug",
"--upstream",
"http://192.168.2.5:80",
],
}
]