|
@@ -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()
|