From 348436ecd937419f4c1de1454aba525e0a289643 Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 23 Jul 2024 13:07:38 +0200 Subject: [PATCH 1/3] Add Trusted Proxies config --- app/Http/Middleware/TrustProxies.php | 9 +++++++++ config/trust-proxies.php | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 config/trust-proxies.php diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 3391630..53ac127 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -25,4 +25,13 @@ class TrustProxies extends Middleware Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; + + + protected function setTrustedProxyIpAddresses(Request $request) + { + $this->proxies = config('trust-proxies.proxies'); + + parent::setTrustedProxyIpAddresses($request); + } + } diff --git a/config/trust-proxies.php b/config/trust-proxies.php new file mode 100644 index 0000000..074a815 --- /dev/null +++ b/config/trust-proxies.php @@ -0,0 +1,5 @@ + env('TRUSTED_PROXIES'), +]; From 0c80061724c10bf54b7a2a65a662c5951741db20 Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 23 Jul 2024 13:08:05 +0200 Subject: [PATCH 2/3] Dockerfile: Fix Uppercase "AS" --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ddc86f..19c400d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM composer:latest as composer +FROM composer:latest AS composer COPY . /var/www/html RUN cd /var/www/html && composer install --no-dev --no-scripts -FROM node:22 as node +FROM node:22 AS node COPY . /var/www/html WORKDIR /var/www/html From 63f35762edec579e0e7c58831a41062d9adb3582 Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 23 Jul 2024 13:09:07 +0200 Subject: [PATCH 3/3] Dockerfile: Add curl Extension --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19c400d..baef1ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,8 +61,7 @@ EOF EXPOSE 8000 - -RUN apk add --no-cache zip php-8.1 php-8.1-intl php-8.1-gd php-8.1-cgi php-8.1-phar php-8.1-iconv php-8.1-mbstring php-8.1-openssl php-8.1-dom +RUN apk add --no-cache zip php-8.1 php-8.1-intl php-8.1-gd php-8.1-cgi php-8.1-phar php-8.1-iconv php-8.1-mbstring php-8.1-openssl php-8.1-dom php-8.1-curl #ENV LOG_CHANNEL=stderr