summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/spack/packages/Dockerfile1
-rw-r--r--share/spack/packages/cors-header.conf3
2 files changed, 4 insertions, 0 deletions
diff --git a/share/spack/packages/Dockerfile b/share/spack/packages/Dockerfile
index 716a52ef68..3b9bd89ec2 100644
--- a/share/spack/packages/Dockerfile
+++ b/share/spack/packages/Dockerfile
@@ -7,5 +7,6 @@ RUN /build/split.sh
FROM nginx:mainline-alpine
COPY --from=build-env --chown=nginx:nginx /build/packages /build/packages.json /usr/share/nginx/html/api/
+COPY cors-header.conf /etc/nginx/conf.d/
CMD ["nginx", "-g", "daemon off;"]
diff --git a/share/spack/packages/cors-header.conf b/share/spack/packages/cors-header.conf
new file mode 100644
index 0000000000..77e34b60a4
--- /dev/null
+++ b/share/spack/packages/cors-header.conf
@@ -0,0 +1,3 @@
+# potentially add even more for preflight support
+# https://enable-cors.org/server_nginx.html
+add_header 'Access-Control-Allow-Origin' '*';