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
dad7a987
Commit
dad7a987
authored
May 21, 2024
by
Michael Yang
Browse files
nosprintfhostport
parent
8ffb5174
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
envconfig/config.go
envconfig/config.go
+3
-2
No files found.
envconfig/config.go
View file @
dad7a987
...
@@ -3,6 +3,7 @@ package envconfig
...
@@ -3,6 +3,7 @@ package envconfig
import
(
import
(
"fmt"
"fmt"
"log/slog"
"log/slog"
"net"
"os"
"os"
"path/filepath"
"path/filepath"
"runtime"
"runtime"
...
@@ -184,8 +185,8 @@ func LoadConfig() {
...
@@ -184,8 +185,8 @@ func LoadConfig() {
AllowOrigins
=
append
(
AllowOrigins
,
AllowOrigins
=
append
(
AllowOrigins
,
fmt
.
Sprintf
(
"http://%s"
,
allowOrigin
),
fmt
.
Sprintf
(
"http://%s"
,
allowOrigin
),
fmt
.
Sprintf
(
"https://%s"
,
allowOrigin
),
fmt
.
Sprintf
(
"https://%s"
,
allowOrigin
),
fmt
.
Sprintf
(
"http://%s
:*
"
,
allowOrigin
),
fmt
.
Sprintf
(
"http://%s"
,
net
.
JoinHostPort
(
allowOrigin
,
"*"
)
),
fmt
.
Sprintf
(
"https://%s
:*
"
,
allowOrigin
),
fmt
.
Sprintf
(
"https://%s"
,
net
.
JoinHostPort
(
allowOrigin
,
"*"
)
),
)
)
}
}
...
...
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