Skip to content

Commit

Permalink
Merge pull request #12 from fly-apps/include_allow_url_fopen_flag
Browse files Browse the repository at this point in the history
Include a flag to turn allow_url_fopen off/on
  • Loading branch information
KTanAug21 authored Jun 4, 2024
2 parents cc29a62 + 7c32ae2 commit 1d6478e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ The following environment variables can be set at run-time or when extending thi
| PHP_MAX_EXECUTION_TIME | php setting max_execution_time | 90 |
| PHP_POST_MAX_SIZE | php setting post_max_size | 100M |
| PHP_UPLOAD_MAX_FILE_SIZE | php setting upload_max_file_size | 100M |
| PHP_ALLOW_URL_FOPEN | php setting allow_url_fopen | Off |
3 changes: 2 additions & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
PHP_MEMORY_LIMIT=256M \
PHP_MAX_EXECUTION_TIME=90 \
PHP_POST_MAX_SIZE=100M \
PHP_UPLOAD_MAX_FILE_SIZE=100M
PHP_UPLOAD_MAX_FILE_SIZE=100M \
PHP_ALLOW_URL_FOPEN=Off

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY php/ondrej_ubuntu_php.gpg /etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg
Expand Down
3 changes: 2 additions & 1 deletion src/Dockerfile-unit
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
PHP_MEMORY_LIMIT=256M \
PHP_MAX_EXECUTION_TIME=90 \
PHP_POST_MAX_SIZE=100M \
PHP_UPLOAD_MAX_FILE_SIZE=100M
PHP_UPLOAD_MAX_FILE_SIZE=100M \
PHP_ALLOW_URL_FOPEN=Off

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY php/ondrej_ubuntu_php.gpg /etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg
Expand Down
5 changes: 4 additions & 1 deletion src/fpm/pool.d/www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -522,4 +522,7 @@ php_admin_value[max_execution_time] = ${PHP_MAX_EXECUTION_TIME}

; Upload settings
php_admin_value[post_max_size] = ${PHP_POST_MAX_SIZE}
php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE}
php_admin_value[upload_max_filesize] = ${PHP_UPLOAD_MAX_FILE_SIZE}

; Allow remote file access settings
php_admin_value[allow_url_fopen] = ${PHP_ALLOW_URL_FOPEN}

0 comments on commit 1d6478e

Please sign in to comment.