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
0fe487e7
Unverified
Commit
0fe487e7
authored
Apr 14, 2025
by
Devon Rifkin
Committed by
GitHub
Apr 14, 2025
Browse files
Merge pull request #10276 from ollama/drifkin/cors-headers
server: add `OpenAI-Beta` header to CORS safelist
parents
6bfaa6e2
97fe45e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
server/routes.go
server/routes.go
+7
-6
No files found.
server/routes.go
View file @
0fe487e7
...
...
@@ -1152,17 +1152,18 @@ func (s *Server) GenerateRoutes(rc *ollama.Registry) (http.Handler, error) {
"X-Requested-With"
,
// OpenAI compatibility headers
"OpenAI-Beta"
,
"x-stainless-arch"
,
"x-stainless-async"
,
"x-stainless-custom-poll-interval"
,
"x-stainless-helper-method"
,
"x-stainless-lang"
,
"x-stainless-package-version"
,
"x-stainless-os"
,
"x-stainless-arch"
,
"x-stainless-package-version"
,
"x-stainless-poll-helper"
,
"x-stainless-retry-count"
,
"x-stainless-runtime"
,
"x-stainless-runtime-version"
,
"x-stainless-async"
,
"x-stainless-helper-method"
,
"x-stainless-poll-helper"
,
"x-stainless-custom-poll-interval"
,
"x-stainless-timeout"
,
}
corsConfig
.
AllowOrigins
=
envconfig
.
AllowedOrigins
()
...
...
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