Closed notcoderguy closed 2 years ago
Forcing URL to HTTPS in AppServiceProvider resolved the issue.
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
This is usually because laravel isn't seeing an HTTPS request. Many reasons for that, but they all boil down to TLS terminating early (i.e. at cloudflare or similar) and not having trusted proxy configured properly
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Laravel version
8.75
PHP version
7.4.3
Voyager version
1.5.2
Database
MySQL 8.0.27
Description
The TinyMCE is not loading as the necessary scripts are giving CSP errors. The file manager is also loading infinitely.
Steps to reproduce
[1] Create a new project. [2] Install voyager with dummy data. [3] Make sure to serve securely.
Expected behavior
Load TinyMCE editor and show File Manager without any errors.
Screenshots
Additional context
When accessing the website via unsecured channel everything is loading normally but I have to disable the SSL for the whole website which I don't want.
I know that this helper function is giving us the links to the assets and I tried to resolve the problem via this but I was unable to get the desired result as no CSS and JS were loaded as MIME types were not assigned to them with my method.
if (!function_exists('voyager_asset')) { function voyager_asset($path, $secure = null) { return route('voyager.voyager_assets').'?path='.urlencode($path); } }