From 97fe45e36da2880bef95398fda711f09c3028998 Mon Sep 17 00:00:00 2001 From: Devon Rifkin Date: Mon, 14 Apr 2025 15:36:10 -0700 Subject: [PATCH] server: add `OpenAI-Beta` header to CORS safelist alphabetized the compat list and then added a single header fixes: #9801 --- server/routes.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/server/routes.go b/server/routes.go index 906426b18..31acd0d1a 100644 --- a/server/routes.go +++ b/server/routes.go @@ -1152,17 +1152,18 @@ func (s *Server) GenerateRoutes(rc *ollama.Registry) (http.Handler, error) { "X-Requested-With", // OpenAI compatibility headers - "x-stainless-lang", - "x-stainless-package-version", - "x-stainless-os", + "OpenAI-Beta", "x-stainless-arch", + "x-stainless-async", + "x-stainless-custom-poll-interval", + "x-stainless-helper-method", + "x-stainless-lang", + "x-stainless-os", + "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()