From fb04ec35991b34d4a0aef4f4b56dff26e3407fdc Mon Sep 17 00:00:00 2001 From: Sebastian <sebastian.karius@informatik.uni-halle.de> Date: Tue, 29 Oct 2024 11:06:54 +0100 Subject: [PATCH] add nginx-cors --- .gitlab-ci.yml | 4 ++-- docker-compose.yml | 4 ++-- docker/nginx-cors/nginx.conf.template | 7 +++++++ helm/nginx-cors/Chart.yaml | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f810c17..6bc8673 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,7 @@ helm-package: - vdo-ninja-0.1.2.tgz - ti-coder-0.2.6.tgz - ti-lamp-0.1.2.tgz - - nginx-cors-0.1.2.tgz + - nginx-cors-0.1.3.tgz expire_in: 1 hour helm-publish: @@ -62,7 +62,7 @@ helm-publish: - 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@vdo-ninja-0.1.2.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"' - 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@ti-coder-0.2.6.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"' - 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@ti-lamp-0.1.2.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"' - - 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@nginx-cors-0.1.2.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"' + - 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@nginx-cors-0.1.3.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"' stages: - build diff --git a/docker-compose.yml b/docker-compose.yml index 8ed8c69..7324bf6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,9 +40,9 @@ services: - ${CI_REGISTRY}/studio-r215/containerize/php-fpm:83 nginx-cors: - image: ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.2 + image: ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.3 build: dockerfile: Dockerfile context: ./docker/nginx-cors cache_from: - - ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.2 \ No newline at end of file + - ${CI_REGISTRY}/studio-r215/containerize/nginx-cors:1.0.3 \ No newline at end of file diff --git a/docker/nginx-cors/nginx.conf.template b/docker/nginx-cors/nginx.conf.template index 7103d91..6ad8aa9 100644 --- a/docker/nginx-cors/nginx.conf.template +++ b/docker/nginx-cors/nginx.conf.template @@ -1,5 +1,12 @@ server { listen 80; + + location /playground { + add_header Content-Security-Policy "default-src 'self'; connect-src 'self';"; + add_header Content-Type text/html; + return 200 '<html><head><title>Playground</title></head><body>Playground</body></html>'; + } + location / { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; diff --git a/helm/nginx-cors/Chart.yaml b/helm/nginx-cors/Chart.yaml index 9d21d1c..7de44c1 100644 --- a/helm/nginx-cors/Chart.yaml +++ b/helm/nginx-cors/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.0.2" +appVersion: "1.0.3" -- GitLab