Skip to content

Commit

Permalink
Merge pull request #19 from OpenPlaceGuide/integration
Browse files Browse the repository at this point in the history
Integration
  • Loading branch information
amenk authored Jul 23, 2024
2 parents 6e2c033 + 63f3576 commit 7ec2ddf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
5 changes: 5 additions & 0 deletions config/trust-proxies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
'proxies' => env('TRUSTED_PROXIES'),
];

0 comments on commit 7ec2ddf

Please sign in to comment.