Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Forced generate HTTPS routes #17

Open
tkapias opened this issue Mar 23, 2021 · 0 comments
Open

Forced generate HTTPS routes #17

tkapias opened this issue Mar 23, 2021 · 0 comments

Comments

@tkapias
Copy link

tkapias commented Mar 23, 2021

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');
        ...
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant