From 7d580f7951124fc3c185f7f7c44505d851311975 Mon Sep 17 00:00:00 2001 From: Eric Poirier Date: Wed, 17 Aug 2022 15:41:49 -0400 Subject: [PATCH] Remove CORS errors for /api/projects Signed-off-by: Eric Poirier --- config/nginx/default.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/nginx/default.conf b/config/nginx/default.conf index 384b09f6..c432b9e9 100644 --- a/config/nginx/default.conf +++ b/config/nginx/default.conf @@ -38,7 +38,16 @@ server { } include conf.d/api-proxy.conf; proxy_pass http://localhost:8092; - + + } + location /api/projects { + if ($request_method = GET) { + add_header Access-Control-Allow-Origin *; + add_header Access-Control-Expose-Headers Etag,Link,Content-Type; + } + include conf.d/api-proxy.conf; + proxy_pass http://localhost:8092; + } } -- GitLab