From 36da0717a2d2b07197b704baae57fbc589bdafac Mon Sep 17 00:00:00 2001 From: Kobe Date: Tue, 26 Aug 2025 09:02:29 +0200 Subject: [PATCH] better launch management caching --- routes/main.py | 11 +++++++++-- static/js/launch_progress.js | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/routes/main.py b/routes/main.py index 1af0689..1d1e156 100644 --- a/routes/main.py +++ b/routes/main.py @@ -2326,6 +2326,13 @@ def init_routes(main_bp): @login_required @require_password_change def create_dns_records(): + """ + Create or update DNS A records in Cloudflare. + + Important: DNS records are created with proxied=False to avoid conflicts + with NGINX Proxy Manager. This ensures direct DNS resolution without + Cloudflare's proxy layer interfering with the NGINX configuration. + """ if not os.environ.get('MASTER', 'false').lower() == 'true': return jsonify({'error': 'Unauthorized'}), 403 @@ -2372,7 +2379,7 @@ def init_routes(main_bp): 'name': domain, 'content': cloudflare_settings['server_ip'], 'ttl': 1, # Auto TTL - 'proxied': True + 'proxied': False # DNS only - no Cloudflare proxy to avoid conflicts with NGINX } update_response = requests.put( @@ -2393,7 +2400,7 @@ def init_routes(main_bp): 'name': domain, 'content': cloudflare_settings['server_ip'], 'ttl': 1, # Auto TTL - 'proxied': True + 'proxied': False # DNS only - no Cloudflare proxy to avoid conflicts with NGINX } create_response = requests.post( diff --git a/static/js/launch_progress.js b/static/js/launch_progress.js index 276dcf4..30772ab 100644 --- a/static/js/launch_progress.js +++ b/static/js/launch_progress.js @@ -1830,6 +1830,13 @@ function updateStatus(step, message, type = 'info', details = '') { } } +/** + * Create an NGINX proxy host for the specified domains. + * + * Important: Caching is disabled (caching_enabled: false) to ensure real-time + * content delivery and avoid potential issues with cached responses interfering + * with dynamic content or authentication. + */ async function createProxyHost(domains, port, sslCertificateId) { try { // Get NGINX settings from the template