From 9167f45c26c122902e42a4b2d6e1a70e5fda0eed Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Wed, 5 Feb 2025 22:35:12 +0000 Subject: [PATCH] Disable Caddy admin panel and http-to-https redirects --- core/scripts/webpanel/webpanel_shell.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/scripts/webpanel/webpanel_shell.sh b/core/scripts/webpanel/webpanel_shell.sh index 3c246a6..e4d5eca 100644 --- a/core/scripts/webpanel/webpanel_shell.sh +++ b/core/scripts/webpanel/webpanel_shell.sh @@ -63,6 +63,15 @@ update_caddy_file() { # Update the Caddyfile without the email directive cat < "$config_file" +# Global configuration +{ + # Disable admin panel of the Caddy + admin off + # Disable automatic HTTP to HTTPS redirects so the Caddy won't listen on port 80 (We need this port for other parts of the project) + auto_https disable_redirects +} + +# Listen for incoming requests on the specified domain and port $DOMAIN:$PORT { # Define a route to handle all requests starting with ROOT_PATH('/$ROOT_PATH/') route /$ROOT_PATH/* {