From dc48175eab0f52eb193514af16de3ba4e65b5597 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Wed, 21 Jan 2026 16:25:17 -0500 Subject: [PATCH] update configs/service homepage --- etc/nginx/conf.d/default.dev.conf | 2 +- etc/nginx/conf.d/default.prod.conf | 2 +- scripts/deploy.sh | 9 +++++++ scripts/gen_services_map.py | 27 +++++++++++---------- scripts/gitweb-simplefrontend/services.html | 27 +++++++++++---------- scripts/homepage.html | 27 +++++++++++---------- 6 files changed, 53 insertions(+), 41 deletions(-) diff --git a/etc/nginx/conf.d/default.dev.conf b/etc/nginx/conf.d/default.dev.conf index 306a747..a97f510 100644 --- a/etc/nginx/conf.d/default.dev.conf +++ b/etc/nginx/conf.d/default.dev.conf @@ -103,7 +103,7 @@ server { add_header X-XSS-Protection "1; mode=block" always; # Legacy protection add_header X-Content-Type-Options "nosniff" always; # Prevent MIME-type sniffing # CSP policy (prevents XSS attacks) - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'" always; client_max_body_size 50m; add_header X-Request-Time $request_time always; diff --git a/etc/nginx/conf.d/default.prod.conf b/etc/nginx/conf.d/default.prod.conf index 64bd94d..46abb46 100644 --- a/etc/nginx/conf.d/default.prod.conf +++ b/etc/nginx/conf.d/default.prod.conf @@ -113,7 +113,7 @@ server { add_header X-XSS-Protection "1; mode=block" always; # Legacy protection add_header X-Content-Type-Options "nosniff" always; # Prevent MIME-type sniffing # CSP policy (prevents XSS attacks) - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'" always; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'" always; client_max_body_size 50m; add_header X-Request-Time $request_time always; diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 1789e2f..a89f626 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -200,6 +200,10 @@ if sudo nginx -t; then sudo chown -R www-data:www-data /srv/git/ fi + # Generate Homepage (always, as a failsafe) + echo "Generating services map..." + python3 "$REPO_ROOT/scripts/gen_services_map.py" + # Deploy Homepage if [ -f "$REPO_ROOT/scripts/homepage.html" ]; then echo "Deploying Homepage..." @@ -209,6 +213,11 @@ if sudo nginx -t; then sudo chmod 644 /var/www/homepage.html fi + # Show deployed config files + echo "" + echo "Deployed configurations:" + tree -a "$DEST_CONF_DIR" 2>/dev/null || ls -la "$DEST_CONF_DIR" + echo "✓ Deployment successful." else echo "✗ Configuration failed validation! Rolling back..." diff --git a/scripts/gen_services_map.py b/scripts/gen_services_map.py index 70265a6..35e64d0 100755 --- a/scripts/gen_services_map.py +++ b/scripts/gen_services_map.py @@ -14,18 +14,18 @@ HTML_TEMPLATE = """ {title} @@ -35,11 +35,12 @@ HTML_TEMPLATE = """ {content}