I updated my version today and it have an issue on https connection it was worked before but after update this error showing to me
Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://'. This request has been blocked; the content must be served over HTTPS.
I'm using yajra datatables class that generated using > php artisan datatables:make ClassDatatable
I think this is an issue on the URL helper and can be fixed using URL::forceScheme('https') as per SO post https://stackoverflow.com/questions/24426423/laravel-generate-secure-https-url-from-route?
This might also help https://rtmccormick.com/2017/07/21/force-assets-to-use-https-laravel/.
I already force https and it was working in https before this update
Now its not working after update
Thanks, it's working
If you are already forcing https, add this $this->app['request']->server->set('HTTPS', true); to the register method.
<?php
namespace App\Providers;
use Illuminate\Routing\UrlGenerator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app['request']->server->set('HTTPS', true);
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(UrlGenerator $url)
{
if (config('app.force_https')) {
$url->forceScheme('https');
}
}
}
Thanks, @devfelipereis It's working
Most helpful comment
If you are already forcing https, add this $this->app['request']->server->set('HTTPS', true); to the register method.