Based on Solving my problem! Since the proxy uses HTTPS and Laravel uses HTTP Request as default you may try to configure it to HTTPS.
Like this
config/app.php
'url' => env('APP_URL', 'https://www.mydomain.com/'),
'asset_url' => env('ASSET_URL', 'https://www.mydomain.com/'),
.env
APP_NAME=XX
APP_ENV=XXX
APP_KEY=base64:XXX
APP_DEBUG=true
APP_URL=https://www.mydomain.com/
app/Providers/AppServiceProvider.php
public function boot()
{
if (env('APP_ENV') !== 'local') {
$this->app['request']->server->set('HTTPS', true);
}
}
routes/web.php
At the beginning of codes add this;
URL::forceRootUrl('https://www.mydomain.com/');
After doing this, your CSS/JS will be loaded as HTTPS not HTTP anymore.
CyberPanel is a modern web hosting control panel powered by OpenLiteSpeed, designed for high performance,…
🚀 Certified Linux System Administrator | DevOps | Server Optimization | Cybersecurity | DRC Solutions…
As a Linux System Administrator, mastering the command line is key to efficiently managing servers,…
Introduction WireGuard is a fast, lightweight, and modern VPN protocol designed for simplicity and performance.If…
Securing your website with HTTPS is essential for privacy, SEO ranking, and user trust. Let’s…
If you manage Linux servers regularly, you know how important SSH (Secure Shell) is. Whether…
This website uses cookies.