mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Merge pull request #755 from mhamzahkhan/feature/reverse-proxy-headers
Configure and enable mod_remoteip, and handle X-Forwarded-Proto header.
This commit is contained in:
commit
d8bd9f7f0c
1 changed files with 9 additions and 1 deletions
|
@ -17,7 +17,15 @@ RUN apt-get update \
|
|||
&& docker-php-ext-install pdo_mysql pcntl gd exif bcmath \
|
||||
&& pecl install imagick \
|
||||
&& docker-php-ext-enable imagick pcntl imagick gd exif \
|
||||
&& a2enmod rewrite \
|
||||
&& a2enmod rewrite remoteip \
|
||||
&& {\
|
||||
echo RemoteIPHeader X-Real-IP ;\
|
||||
echo RemoteIPTrustedProxy 10.0.0.0/8 ;\
|
||||
echo RemoteIPTrustedProxy 172.16.0.0/12 ;\
|
||||
echo RemoteIPTrustedProxy 192.168.0.0/16 ;\
|
||||
echo SetEnvIf X-Forwarded-Proto "https" HTTPS=on ;\
|
||||
} > /etc/apache2/conf-available/remoteip.conf \
|
||||
&& a2enconf remoteip \
|
||||
&& curl -LsS https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /usr/bin/composer \
|
||||
&& echo "${COMPOSER_CHECKSUM} /usr/bin/composer" | sha256sum -c - \
|
||||
&& chmod 755 /usr/bin/composer \
|
||||
|
|
Loading…
Reference in a new issue