mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 15:06:49 +01:00
API app/browser access (#4879)
* API app/browser access * Add tauri (resolves #2291, #4791, #3799, #4388)
This commit is contained in:
@@ -960,6 +960,10 @@ 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", "runtime", "runtime-version", "async"}
|
||||
for _, prop := range openAIProperties {
|
||||
config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)
|
||||
}
|
||||
config.AllowOrigins = envconfig.AllowOrigins
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
Reference in New Issue
Block a user