Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
0d713051
Unverified
Commit
0d713051
authored
Oct 14, 2025
by
Jeffrey Morgan
Committed by
GitHub
Oct 14, 2025
Browse files
envconfig: default to port 443 when connecting to ollama.com (#12617)
parent
c4c5a4a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
envconfig/config.go
envconfig/config.go
+3
-0
envconfig/config_test.go
envconfig/config_test.go
+1
-0
No files found.
envconfig/config.go
View file @
0d713051
...
@@ -24,6 +24,9 @@ func Host() *url.URL {
...
@@ -24,6 +24,9 @@ func Host() *url.URL {
switch
{
switch
{
case
!
ok
:
case
!
ok
:
scheme
,
hostport
=
"http"
,
s
scheme
,
hostport
=
"http"
,
s
if
s
==
"ollama.com"
{
scheme
,
hostport
=
"https"
,
"ollama.com:443"
}
case
scheme
==
"http"
:
case
scheme
==
"http"
:
defaultPort
=
"80"
defaultPort
=
"80"
case
scheme
==
"https"
:
case
scheme
==
"https"
:
...
...
envconfig/config_test.go
View file @
0d713051
...
@@ -37,6 +37,7 @@ func TestHost(t *testing.T) {
...
@@ -37,6 +37,7 @@ func TestHost(t *testing.T) {
"https"
:
{
"https://1.2.3.4"
,
"https://1.2.3.4:443"
},
"https"
:
{
"https://1.2.3.4"
,
"https://1.2.3.4:443"
},
"https port"
:
{
"https://1.2.3.4:4321"
,
"https://1.2.3.4:4321"
},
"https port"
:
{
"https://1.2.3.4:4321"
,
"https://1.2.3.4:4321"
},
"proxy path"
:
{
"https://example.com/ollama"
,
"https://example.com:443/ollama"
},
"proxy path"
:
{
"https://example.com/ollama"
,
"https://example.com:443/ollama"
},
"ollama.com"
:
{
"ollama.com"
,
"https://ollama.com:443"
},
}
}
for
name
,
tt
:=
range
cases
{
for
name
,
tt
:=
range
cases
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment