laraestimate icon indicating copy to clipboard operation
laraestimate copied to clipboard

Forced generate HTTPS routes

Open tkapias opened this issue 3 years ago • 0 comments

I use LaraEstimate behind Nginx proxy_pass with SSL.

Here is my modification to force the app to generate links and routes with https :

root/app/Providers/AppServiceProvider.php

  • Add use Illuminate\Support\Facades\URL; :
<?php

namespace App\Providers;

use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use KgBot\LaravelLocalization\Facades\ExportLocalizations;
use Illuminate\Support\Facades\URL;
...
  • Add URL::forceScheme('https'); in boot() function :
    public function boot()
    {
        URL::forceScheme('https');
        ...

tkapias avatar Mar 23 '21 11:03 tkapias