diff --git a/.github/workflows/nginx-deploy.yml b/.github/workflows/nginx-deploy.yml index 7f8feef..6468e94 100644 --- a/.github/workflows/nginx-deploy.yml +++ b/.github/workflows/nginx-deploy.yml @@ -12,6 +12,12 @@ jobs: deploy-nginx: runs-on: self-hosted steps: + - name: Configure Git + run: | + git config --global url."https://oauth2:${GITLAB_TOKEN}@git.ntnu.no".insteadOf "https://git.ntnu.no" + env: + GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + - name: Checkout repository uses: actions/checkout@v2 @@ -23,5 +29,6 @@ jobs: - name: Verify nginx configuration run: | - curl -I http://localhost + sleep 5 # Give nginx time to reload + curl -I http://tdt4242-26.idi.ntnu.no || true # Use the actual server name sudo systemctl status nginx \ No newline at end of file diff --git a/nginx_securefit.conf b/nginx_securefit.conf index e13f6ab..1320625 100644 --- a/nginx_securefit.conf +++ b/nginx_securefit.conf @@ -6,9 +6,12 @@ server { root /var/www/html; index index.html; try_files $uri $uri/ =404; + + # Allow all access for testing + allow all; } - # Add some basic security headers + # Basic security headers add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff";