-
Notifications
You must be signed in to change notification settings - Fork 52
feat: Self-hosting nginx config improvements #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- hardened cipher suites - strip nginx version from sever response header - fix: http deprecated directive - added: cloudflare ip forwarding scaffolding - documented routing structure
|
@cursor review |
- Consolidated server block for improved readability - Maintained existing TLS and proxy settings - Ensured proper routing for API and frontend traffic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the self-hosting nginx configuration with security hardening, HTTP/2 support via the modern directive syntax, and optional Cloudflare IP forwarding scaffolding. The changes improve TLS security, hide server version information, and remove the cloud-only /kms/ route that's not applicable to self-hosted deployments.
Key changes:
- Hardened TLS configuration with restricted cipher suites (TLSv1.2/1.3 only) and server cipher preference
- Modernized HTTP/2 enablement using the
http2 on;directive instead of deprecatedlisten 443 ssl http2;syntax - Added security header
server_tokens offto hide nginx version information - Included commented-out Cloudflare IP forwarding configuration for users behind Cloudflare
- Removed the
/kms/route which only exists in cloud-hosted mode (APP_HOST == "cloud")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🔍 Overview
Misc security, compatibility and quality of life improvements to the self-hosting
default.confNginx config.💡 Proposed Changes
EECDH+AESGCM:EECDH+CHACHA20onTLSv1.2 TLSv1.3;server_tokens off;Note
Harden Nginx TLS and headers, enable HTTP/2, add Cloudflare IP-forwarding scaffold, restructure config, and remove the
/kms/route.nginx/default.conf):ssl_protocols TLSv1.2 TLSv1.3and setssl_ciphers EECDH+AESGCM:EECDH+CHACHA20; enablessl_prefer_server_ciphers on.server_tokens off.http2 on.http { server { ... } }; keeplisten 80andlisten 443 ssl.$http_cf_connecting_ipmapping./service/backend routing with rewrite and cookie/security headers./frontend routing with WebSocket headers.location /kms/route.Written by Cursor Bugbot for commit 4539944. Configure here.