[GH-ISSUE #7800] Loosing useragent after HTTP redirect while pulling models #4987

Open
opened 2026-04-12 16:03:02 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ZeGuigui on GitHub (Nov 22, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7800

What is the issue?

When pulling a model, a first HTTP GET call is issued using a specific ollama user agent (like ollama/0.4.2). The following GET requests to cloudflare use a different user agent (Go-http-client/1.1).

My company use firewall rules based on domains and user agents. Ollama should use a consistent useragent for all its http requests

Logs from my IT department (pulling nomic-embed-text):

[22/Nov/2024:15:47:19 +0100] "" int.ern.ali.pv4 307 "GET https://registry.ollama.ai/v2/library/nomic-embed-text/blobs/sha256:970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6 HTTP/2.0" "Business, Software/Hardware" "Minimal Risk" "text/html" 1304 "ollama/0.4.2 (arm64 darwin) Go/go1.23.3" "" "0" ipv6:here:removed
[22/Nov/2024:15:47:50 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 74291068 "Go-http-client/1.1" "" "0" ipv6:here:removed
[22/Nov/2024:15:47:51 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 100000413 "Go-http-client/1.1" "" "0" ipv6:here:removed
[22/Nov/2024:15:47:55 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 100000404 "Go-http-client/1.1" "" "0" ipv6:here:removed

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.4.2

Originally created by @ZeGuigui on GitHub (Nov 22, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7800 ### What is the issue? When pulling a model, a first HTTP GET call is issued using a specific ollama user agent (like `ollama/0.4.2`). The following GET requests to cloudflare use a different user agent (`Go-http-client/1.1`). My company use firewall rules based on domains and user agents. Ollama should use a consistent useragent for all its http requests Logs from my IT department (pulling nomic-embed-text): ``` [22/Nov/2024:15:47:19 +0100] "" int.ern.ali.pv4 307 "GET https://registry.ollama.ai/v2/library/nomic-embed-text/blobs/sha256:970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6 HTTP/2.0" "Business, Software/Hardware" "Minimal Risk" "text/html" 1304 "ollama/0.4.2 (arm64 darwin) Go/go1.23.3" "" "0" ipv6:here:removed [22/Nov/2024:15:47:50 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 74291068 "Go-http-client/1.1" "" "0" ipv6:here:removed [22/Nov/2024:15:47:51 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 100000413 "Go-http-client/1.1" "" "0" ipv6:here:removed [22/Nov/2024:15:47:55 +0100] "" int.ern.ali.pv4 206 "GET https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/blobs/sha256/97/970aa74c0a90ef7482477cf803618e776e173c007bf957f635f1015bfcfef0e6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxx&X-Amz-Date=20241122T144719Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx HTTP/1.1" "Content Server" "Minimal Risk" "application/octet-stream" 100000404 "Go-http-client/1.1" "" "0" ipv6:here:removed ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.4.2
GiteaMirror added the bug label 2026-04-12 16:03:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4987