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
6ae2adc1
Unverified
Commit
6ae2adc1
authored
Jan 09, 2025
by
isamu arimoto
Committed by
GitHub
Jan 08, 2025
Browse files
openai: accept additional headers to fix CORS errors (#8343)
parent
1deafd82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
server/routes.go
server/routes.go
+1
-1
No files found.
server/routes.go
View file @
6ae2adc1
...
...
@@ -1131,7 +1131,7 @@ func (s *Server) GenerateRoutes() http.Handler {
config
.
AllowWildcard
=
true
config
.
AllowBrowserExtensions
=
true
config
.
AllowHeaders
=
[]
string
{
"Authorization"
,
"Content-Type"
,
"User-Agent"
,
"Accept"
,
"X-Requested-With"
}
openAIProperties
:=
[]
string
{
"lang"
,
"package-version"
,
"os"
,
"arch"
,
"retry-count"
,
"runtime"
,
"runtime-version"
,
"async"
}
openAIProperties
:=
[]
string
{
"lang"
,
"package-version"
,
"os"
,
"arch"
,
"retry-count"
,
"runtime"
,
"runtime-version"
,
"async"
,
"helper-method"
,
"poll-helper"
,
"custom-poll-interval"
}
for
_
,
prop
:=
range
openAIProperties
{
config
.
AllowHeaders
=
append
(
config
.
AllowHeaders
,
"x-stainless-"
+
prop
)
}
...
...
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