diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2019-09-07 23:31:14 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-09-08 17:19:37 -0700 |
commit | 02931a82fd506a095ab93d6ad1d0dc416caf141d (patch) | |
tree | 6ad2970d16a5496352ff914b74c1739780689a19 /share | |
parent | db1fb168406abb26f2f5a2d2d19cbc1089a54a9f (diff) | |
download | spack-02931a82fd506a095ab93d6ad1d0dc416caf141d.tar.gz spack-02931a82fd506a095ab93d6ad1d0dc416caf141d.tar.bz2 spack-02931a82fd506a095ab93d6ad1d0dc416caf141d.tar.xz spack-02931a82fd506a095ab93d6ad1d0dc416caf141d.zip |
Add CORS for spack.packages.io
Add the HTTP header `Access-Control-Allow-Origin: *` for our NGINX
service that is serving static JSON content on
https://spack.packages.io .
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/packages/Dockerfile | 1 | ||||
-rw-r--r-- | share/spack/packages/cors-header.conf | 3 |
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' '*'; |