Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
[NT] Fix chmods in dev mode
Browse files Browse the repository at this point in the history
Change-Id: I4637ad458a6f9f9d65550f646386fa25af0dd499
  • Loading branch information
fracz committed Jul 18, 2019
1 parent ed440df commit 034557a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ defined('REPEKA_ENV') || define('REPEKA_ENV', $input->getParameterOption(['--env
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && REPEKA_ENV !== 'prod';
if ($debug) {
Debug::enable();
umask(0000);
}
$kernel = new AppKernel(REPEKA_ENV, $debug);
$application = new Application($kernel);
Expand Down
6 changes: 5 additions & 1 deletion web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
ini_set('log_errors', true);
ini_set('error_log', __DIR__ . '/../var/logs/php_error.log');
defined('REPEKA_ENV') || define('REPEKA_ENV', (getenv('REPEKA_ENV') ?: 'prod'));
$loader = require __DIR__ . '/../app/autoload.php';
define('TRUSTED_PROXIES_CONFIG', __DIR__ . '/../var/config/proxy/trusted-proxies.php');
$loader = require __DIR__ . '/../app/autoload.php';
if (file_exists(TRUSTED_PROXIES_CONFIG)) {
$proxyIps = require TRUSTED_PROXIES_CONFIG;
Request::setTrustedProxies($proxyIps, Request::HEADER_FORWARDED | Request::HEADER_X_FORWARDED_FOR);
}
$kernel = new AppKernel(REPEKA_ENV, REPEKA_ENV === 'dev');
if (REPEKA_ENV === 'dev') {
Symfony\Component\Debug\Debug::enable();
umask(0000);
}
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
Expand Down

0 comments on commit 034557a

Please sign in to comment.