Skip to content

Commit

Permalink
Merge pull request #29 from soukbrasil/main
Browse files Browse the repository at this point in the history
Flag to force https on endpoint
  • Loading branch information
infureal authored Mar 2, 2022
2 parents f1dba07 + e765b74 commit 506d6c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions config/artisan-gui.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
*/
'local' => true,

/*
|--------------------------------------------------------------------------
| Force HTTPS
|--------------------------------------------------------------------------
|
| Flag to force https on endpoint
|
*/
'force-https' => env('FORCE_HTTPS_ARTISAN_GUI', false),

/*
|--------------------------------------------------------------------------
| List of command permissions
Expand Down
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<body class="bg-gray-100 font-mono">

<div id="app">
<app home="{{ url(config('artisan-gui.home', '/')) }}" endpoint="{{ route('gui.index') }}" />
<app home="{{ url(config('artisan-gui.home', '/')) }}" endpoint="{{ config('artisan-gui.force-https', false) ? secure_url(URL::route('gui.index', [], false)) : route('gui.index') }}" />
</div>

@include('gui::partials.scripts')
Expand Down

0 comments on commit 506d6c9

Please # to comment.