client: add request signing to the client (#10881)

If OLLAMA_AUTH is set, sign each request w/ a timestamp and pass the signature in the token header
This commit is contained in:
Patrick Devine
2025-05-27 16:50:57 -07:00
committed by GitHub
parent ea79003180
commit aa25aff10d
2 changed files with 52 additions and 0 deletions

View File

@@ -183,6 +183,8 @@ var (
NewEngine = Bool("OLLAMA_NEW_ENGINE")
// ContextLength sets the default context length
ContextLength = Uint("OLLAMA_CONTEXT_LENGTH", 4096)
// Auth enables authentication between the Ollama client and server
UseAuth = Bool("OLLAMA_AUTH")
)
func String(s string) func() string {