From 9496f05331a3b10d393a2fbff0ee566c3610ed56 Mon Sep 17 00:00:00 2001 From: saibotk Date: Sun, 18 Aug 2019 12:35:04 +0200 Subject: [PATCH] adjust trusted proxies setup | Panel 0.7.15 --- README.md | 3 +-- services/php/Dockerfile | 2 +- services/php/install.sh | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4abfa12..a5358f8 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,7 @@ of containers and Dockerfiles. that Nginx performs better than Caddy in handling requests. In addition to this, Nginx, while having a more complicated configuration file, doesn't enforce HTTPS, a feature of Caddy which only complicates the setup of the HTTP Docker container. - -Also if the nginx receives a request from a reverse proxy, it will set the HSTS header +3. Additionally, if the nginx receives a request from a reverse proxy, it will set the HSTS header and redirect to HTTPS automatically. If you do not want this behaviour, adjust the `nginx.conf` as you like. diff --git a/services/php/Dockerfile b/services/php/Dockerfile index 14ae1c9..5380211 100644 --- a/services/php/Dockerfile +++ b/services/php/Dockerfile @@ -1,6 +1,6 @@ FROM php:7.2-fpm-alpine -ENV PANEL_VERSION=v0.7.14 +ENV PANEL_VERSION=v0.7.15 # Set up all the dependencies for the PHP container. RUN apk add --no-cache curl git supervisor tar unzip; \ diff --git a/services/php/install.sh b/services/php/install.sh index 2df214c..34cf601 100755 --- a/services/php/install.sh +++ b/services/php/install.sh @@ -12,7 +12,7 @@ fi echo "Are you sure you want to continue the install script? (Y/n)" read -n1 run -if [ "$run" = "y" ] || [ "$run" = "Y" ] || [ "$run" = "" ]; then +if [ "$run" = "y" ] || [ "$run" = "Y" ]; then echo "Running install script." echo "Waiting 15 seconds for MariaDB to be ready." sleep 15 @@ -25,7 +25,7 @@ if [ "$run" = "y" ] || [ "$run" = "Y" ] || [ "$run" = "" ]; then if [ "$configureTPval" = "" ]; then configureTPval="*" fi - printf "\n\nTRUSTED_PROXIES=$configureTPval" >> .env + grep -q 'TRUSTED_PROXIES.*' .env && sed -i .env -e 's/TRUSTED_PROXIES.*/TRUSTED_PROXIES='$configureTPval'/' || printf "\nTRUSTED_PROXIES=$configureTPval\n" >> .env fi php artisan key:generate --force