mirror of
https://github.com/ollama/ollama.git
synced 2025-03-26 17:51:48 +01:00
openai: accept additional headers to fix CORS errors (#8343)
This commit is contained in:
parent
1deafd8254
commit
6ae2adc1af
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user