Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
API app/browser access (#4879)
royjhan1a29e9a87943
diff --git a/envconfig/config.go b/envconfig/config.goindex 77e3e789d..ae4e99391 100644--- a/envconfig/config.go+++ b/envconfig/config.go@@ -190,6 +190,12 @@ func LoadConfig() {)}+ AllowOrigins = append(AllowOrigins,+ "app://*",+ "file://*",+ "tauri://*",+ )+maxRunners := clean("OLLAMA_MAX_LOADED_MODELS")if maxRunners != "" {m, err := strconv.Atoi(maxRunners)diff --git a/server/routes.go b/server/routes.goindex ecd600818..188fe9748 100644--- a/server/routes.go+++ b/server/routes.go@@ -960,6 +960,10 @@ func (s *Server) GenerateRoutes() http.Handler {config.AllowWildcard = trueconfig.AllowBrowserExtensions = trueconfig.AllowHeaders = []string{"Authorization", "Content-Type", "User-Agent", "Accept", "X-Requested-With"}+ openAIProperties := []string{"lang", "package-version", "os", "arch", "runtime", "runtime-version", "async"}+ for _, prop := range openAIProperties {+ config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)+ }config.AllowOrigins = envconfig.AllowOriginsr := gin.Default()