From 905e3468cbcfc52ad916b202cf64914ba88f4509 Mon Sep 17 00:00:00 2001 From: victor barbier Date: Thu, 13 Feb 2025 10:11:32 +0100 Subject: [PATCH] fix(nginx): quatrieme tentative --- client/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/nginx.conf b/client/nginx.conf index b7005ca..8a1bb2c 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -1,6 +1,7 @@ server { listen 3000; resolver 8.8.8.8; + add_header 'Access-Control-Allow-Origin' "$http_origin" always; location / { root /usr/share/nginx/html; index index.html index.htm; @@ -21,8 +22,8 @@ server { client_max_body_size 10M; } location ~ ^/mistral/(.*)$ { + add_header 'Access-Control-Allow-Origin' "$http_origin" always; proxy_pass https://api.mistral.ai/v1/$1; - proxy_set_header Access-Control-Allow-Origin "$http_origin" proxy_set_header Authorization 'Bearer $MISTRAL_KEY'; proxy_set_header Accept application/json; proxy_set_header Content-Type application/json;