1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixed Request being statically called

Signed-off-by: Sebastian Klaus <sebastian@klaus.com.au>
This commit is contained in:
Sebastian Klaus 2016-07-14 23:22:11 +08:00
parent 8590f9ad17
commit 235acb05a4
2 changed files with 4 additions and 3 deletions

View File

@ -26,3 +26,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- "Manual entry" untranslatable #562
- Using a database table prefix breaks the dashboard #203
- Request statically called in StartupCheck.php #977

View File

@ -33,12 +33,12 @@ class StartupCheck
// TRUSTED_PROXIES accepts a comma delimited list of subnets
// ie, TRUSTED_PROXIES='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
if (isset($_ENV['TRUSTED_PROXIES'])) {
Request::setTrustedProxies(array_map('trim', explode(',', env('TRUSTED_PROXIES'))));
$request->setTrustedProxies(array_map('trim', explode(',', env('TRUSTED_PROXIES'))));
}
// Ensure all request are over HTTPS in production
if (Utils::requireHTTPS() && !Request::secure()) {
return Redirect::secure(Request::path());
if (Utils::requireHTTPS() && !$request->secure()) {
return Redirect::secure($request->path());
}
// If the database doens't yet exist we'll skip the rest