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 .
This commit is contained in:
parent
db1fb16840
commit
02931a82fd
2 changed files with 4 additions and 0 deletions
|
@ -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;"]
|
||||
|
|
3
share/spack/packages/cors-header.conf
Normal file
3
share/spack/packages/cors-header.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# potentially add even more for preflight support
|
||||
# https://enable-cors.org/server_nginx.html
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
Loading…
Reference in a new issue