Changes
PR #2277 by pcbeingused333 and ksylvan: fix(server): redact the API key in the recovery request dumps
- Fixed the server so that
gin.Recovery()request dumps no longer leak theX-API-Keyheader in clear text;CookieandProxy-Authorizationare now masked as well. - Applied the redaction through the Gin recovery middleware, so both the REST and Ollama servers are protected, with tests covering the debug-mode panic dump and the broken-pipe dump.
- Exported
RedactingWriterand simplified the recovery log redaction logic, splitting request dumps on CRLF and matching header prefixes case-sensitively. - Fixed flaky CLI image tests by isolating their files in a private temporary directory instead of the shared
/tmp, preventing "image file already exists" failures during parallel runs. - Switched image test paths to automatic
t.TempDir()cleanup and portable path construction withfilepath.Join.