Ask, reply and learn. Join the community of Akaunting.
I have setup akauntin in docker countainer using nginx proxy that adds letsencrypt and servers the site using https.
Wich recents browers becomming more and more "defensive" they object against .css, js resources being loaded through http ( and not https )
regardless of the setting of APP_URL in the .env
APP_URL=https://asdfadsf
the application renders recources with http://
the culprit seems to be the usage of
asset('
where
secure_asset('
seems to be the better choice
After searching for quite some time i found a solution in modifying
./app/Providers/AppServiceProvider.php
modify the boot() by adding
\URL::forceScheme('https');
for me that results in
public function boot()
{
// Laravel db fix
Schema::defaultStringLength(191);
\URL::forceScheme('https');
}
Its a "harcoded" one-line hack that is obviously ONLY going to work when https is enabled. It however makes akaunting usable again untli a proper solution is implemented
Marco
Thanks for your help, but why isn´t there an easier way to set this up?
Showing 1 to 2 of 2 discussions