Laravel and Nginx letsencrypt
Good morning, everybody,
By necessity I found myself having to configure a docker solution with Nginx as a reverse proxy HTTPS and a container with a Laravel solution all protected by Cloudflare.
Up to now everything was fine in the sense that with Cloudflare that forced from HTTP to HTTPS there was no mixed content problem.
The problem arose when it came to the need to access the machine via internal LAN network.
Here I started having browser-side mixed content problems and many things were blocked with various insecure content errors.
The solution after several searches was to intervene on the Laravel configuration side in this way:
Edit AppServiceProvider.php
public function register() { $this->app['request']->server->set('HTTPS', true); }
References: