Skip to content

Forced generate HTTPS routes #17

@tkapias

Description

@tkapias

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');
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions