Skip to content

Commit

Permalink
testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haahauge committed Apr 2, 2025
1 parent 87d5410 commit 068b37c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/nginx-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
5 changes: 4 additions & 1 deletion nginx_securefit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 068b37c

Please sign in to comment.