diff --git a/Caddyfile b/Caddyfile index 77e7e11..1687c32 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,70 +1,70 @@ { - # Global options - admin off # Disable admin API + # Global options + admin off # Disable admin API - # Global logging configuration - log { - output file /var/log/caddy/access.log - format json - level INFO - } + # Global logging configuration + log { + output file /var/log/caddy/access.log + format json + level INFO + } } noxious.gg { - # Root directory for your Vue app - root * ./dist + # Root directory for your Vue app + root * ./dist - # Enable compression with optimal settings - encode zstd gzip + # Enable compression with optimal settings + encode zstd gzip - # Handle SPA routing - try_files {path} /index.html + # Handle SPA routing + try_files {path} /index.html - # Serve static files with optimizations - file_server + # Serve static files with optimizations + file_server - # Enhanced security headers - header { - # Existing headers with improvements - X-Frame-Options "SAMEORIGIN" - X-XSS-Protection "1; mode=block" - X-Content-Type-Options "nosniff" - Referrer-Policy "strict-origin-when-cross-origin" + # Enhanced security headers + header { + # Existing headers with improvements + X-Frame-Options "SAMEORIGIN" + X-XSS-Protection "1; mode=block" + X-Content-Type-Options "nosniff" + Referrer-Policy "strict-origin-when-cross-origin" - # Additional security headers - Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" - Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" + # Additional security headers + Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" + Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" - # Remove server information - -Server - } + # Remove server information + -Server + } - # Improved cache configuration for static assets - @static { - file - path *.js *.css *.png *.jpg *.jpeg *.gif *.ico *.svg *.woff *.woff2 *.ttf *.eot - } - header @static { - Cache-Control "public, max-age=31536000, immutable" - Vary Accept-Encoding - } + # Improved cache configuration for static assets + @static { + file + path *.js *.css *.png *.jpg *.jpeg *.gif *.ico *.svg *.woff *.woff2 *.ttf *.eot + } + header @static { + Cache-Control "public, max-age=31536000, immutable" + Vary Accept-Encoding + } - # Cache control for HTML files - @html { - file - path *.html - } - header @html { - Cache-Control "no-cache, must-revalidate" - } + # Cache control for HTML files + @html { + file + path *.html + } + header @html { + Cache-Control "no-cache, must-revalidate" + } - # Handle errors - handle_errors { - respond "{http.error.status_code} {http.error.status_text}" {http.error.status_code} - } + # Handle errors + handle_errors { + respond "{http.error.status_code} {http.error.status_text}" {http.error.status_code} + } } # Improved redirect configuration www.noxious.gg { - redir https://noxious.gg{uri} permanent -} \ No newline at end of file + redir https://noxious.gg{uri} permanent +}