mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-02-06 08:18:27 +01:00
Add option to enforce HTTPS usage behind proxies
This commit is contained in:
parent
6493cf8806
commit
6b2d4734d5
@ -11,6 +11,8 @@ APP_ENV=local
|
|||||||
APP_KEY=
|
APP_KEY=
|
||||||
# Enable the debug more if you are running into issues or while developing
|
# Enable the debug more if you are running into issues or while developing
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
|
# Set to true, if you are using a proxy that terminates SSL. Required to get the correct URLs for LinkAce
|
||||||
|
FORCE_HTTPS=false
|
||||||
|
|
||||||
## Configuration of the database connection
|
## Configuration of the database connection
|
||||||
# Set the database driver (mysql, )
|
# Set the database driver (mysql, )
|
||||||
|
@ -12,7 +12,7 @@ class TrustProxies extends Middleware
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $proxies;
|
protected $proxies = '**';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The headers that should be used to detect proxies.
|
* The headers that should be used to detect proxies.
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
@ -15,6 +16,10 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
|
||||||
|
if (env('FORCE_HTTPS', false)) {
|
||||||
|
URL::forceSchema('https');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user