From 81e99c5088df375846fb3ffef4d079825882657f Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Mon, 25 Nov 2024 11:12:05 +0000 Subject: [PATCH] To make the api work with the Swagger editor cors headers need setting appropriately. This won't affect api access unless done via browser. --- service-api/docker/web/etc/confd/templates/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service-api/docker/web/etc/confd/templates/nginx.conf b/service-api/docker/web/etc/confd/templates/nginx.conf index d9d74cf1cb..625c17f2da 100755 --- a/service-api/docker/web/etc/confd/templates/nginx.conf +++ b/service-api/docker/web/etc/confd/templates/nginx.conf @@ -38,6 +38,9 @@ server { gzip_vary on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml; + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Headers' 'User-Token' always; + location / { root /web; try_files $uri /index.php$is_args$args;