mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Add require HTTPS self host setting
This commit is contained in:
parent
78108b3cd9
commit
edc3531965
@ -56,6 +56,7 @@ class AppController extends BaseController
|
||||
$app = Input::get('app');
|
||||
$app['key'] = env('APP_KEY') ?: str_random(RANDOM_KEY_LENGTH);
|
||||
$app['debug'] = Input::get('debug') ? 'true' : 'false';
|
||||
$app['https'] = Input::get('https') ? 'true' : 'false';
|
||||
|
||||
$database = Input::get('database');
|
||||
$dbType = 'mysql'; // $database['default'];
|
||||
@ -80,6 +81,7 @@ class AppController extends BaseController
|
||||
|
||||
$_ENV['APP_ENV'] = 'production';
|
||||
$_ENV['APP_DEBUG'] = $app['debug'];
|
||||
$_ENV['REQUIRE_HTTPS'] = $app['https'];
|
||||
$_ENV['APP_URL'] = $app['url'];
|
||||
$_ENV['APP_KEY'] = $app['key'];
|
||||
$_ENV['APP_CIPHER'] = env('APP_CIPHER', 'AES-256-CBC');
|
||||
@ -157,6 +159,7 @@ class AppController extends BaseController
|
||||
|
||||
$_ENV['APP_URL'] = $app['url'];
|
||||
$_ENV['APP_DEBUG'] = Input::get('debug') ? 'true' : 'false';
|
||||
$_ENV['REQUIRE_HTTPS'] = Input::get('https') ? 'true' : 'false';
|
||||
|
||||
$_ENV['DB_TYPE'] = 'mysql'; // $db['default'];
|
||||
$_ENV['DB_HOST'] = $db['type']['host'];
|
||||
|
@ -2280,6 +2280,10 @@ $LANG = array(
|
||||
'this_month' => 'This Month',
|
||||
'last_month' => 'Last Month',
|
||||
'custom_range' => 'Custom Range',
|
||||
'url' => 'URL',
|
||||
'debug' => 'Debug',
|
||||
'https' => 'HTTPS',
|
||||
'require' => 'Require',
|
||||
|
||||
);
|
||||
|
||||
|
@ -3,11 +3,9 @@
|
||||
<h3 class="panel-title">Application Settings</h3>
|
||||
</div>
|
||||
<div class="panel-body form-padding-right">
|
||||
{!! Former::text('app[url]')->label('URL')->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!}
|
||||
{!! Former::checkbox('debug')
|
||||
->label('Debug')
|
||||
->text(trans('texts.enable'))
|
||||
->check(config('app.debug')) !!}
|
||||
{!! Former::text('app[url]')->label(trans('texts.url'))->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!}
|
||||
{!! Former::checkbox('debug')->text(trans('texts.enable'))->check(config('app.debug')) !!}
|
||||
{!! Former::checkbox('https')->text(trans('texts.require'))->check(env('REQUIRE_HTTPS')) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user