mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Learned that I should not refer to env vars directly so I removed all references.
This commit is contained in:
@@ -54,7 +54,7 @@ class Installer
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ('testing' === env('APP_ENV')) {
|
||||
if ('testing' === config('app.env')) {
|
||||
return $next($request);
|
||||
}
|
||||
$url = $request->url();
|
||||
|
@@ -107,7 +107,7 @@ class Range
|
||||
*/
|
||||
private function loseItAll(Request $request): void
|
||||
{
|
||||
if ('sqlite' === getenv('DB_CONNECTION') && true === getenv('IS_DOCKER')) {
|
||||
if ('sqlite' === config('database.default') && true === config('firefly.is_docker')) {
|
||||
// @codeCoverageIgnoreStart
|
||||
$request->session()->flash(
|
||||
'error', 'You seem to be using SQLite in a Docker container. Don\'t do this. If the container restarts all your data will be gone.'
|
||||
|
@@ -44,7 +44,7 @@ class SecureHeaders
|
||||
{
|
||||
$response = $next($request);
|
||||
$google = '';
|
||||
$analyticsId = env('ANALYTICS_ID', '');
|
||||
$analyticsId = config('firefly.analytics_id');
|
||||
if ('' !== $analyticsId) {
|
||||
$google = 'www.googletagmanager.com/gtag/js'; // @codeCoverageIgnore
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class SecureHeaders
|
||||
"payment 'none'",
|
||||
];
|
||||
|
||||
$disableFrameHeader = env('DISABLE_FRAME_HEADER');
|
||||
$disableFrameHeader = config('firefly.disable_frame_header');
|
||||
if (false === $disableFrameHeader || null === $disableFrameHeader) {
|
||||
$response->header('X-Frame-Options', 'deny');
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class TrustProxies extends Middleware
|
||||
*/
|
||||
public function __construct(Repository $config)
|
||||
{
|
||||
$trustedProxies = (string)env('TRUSTED_PROXIES', null);
|
||||
$trustedProxies = (string)config('firefly.trusted_proxies');
|
||||
$this->proxies = explode(',', $trustedProxies);
|
||||
if ('**' === $trustedProxies) {
|
||||
$this->proxies = '**';
|
||||
|
Reference in New Issue
Block a user