@devionti The problem is that you force HTTPS only your website. The browser now expects that all requests go for HTTPS. This also counts for CSS or JS resources you try to include. In your developer console in the browser you can see what resource/URL is causing this.
Sep 2, 2020
3
Level 2
chartjs won't load over HTTPS
How can I force chartjs to work over HTTPS
So Chartjs loads fine when I am using a model if I use HTTP, if I use HTTPS I get this error
This request has been blocked; the content must be served over HTTPS.
This is the code I am using that only works on HTTP but not HTTPS
(new StackedChart())
->title('Totalbeds')
->model('\App\Model\Hotel\Room') // Use Your Model Here
->series(array([
'label' => 'Location 1',
'filter' => [
'key' => 'id', // State Column for Count Calculation Here
'value' => '1'
],
]
))
->options([
'sum' => 'totalbeds' // Add the column you want to calculate
])
->width('2/3'),
I am unsure how can I force chartjs to use HTTPS, forceSchema won't work because chartjs is not available in routes since I am using NOVA.
if (env('APP_ENV') === 'production') {
URL::forceSchema('https');
}
Please or to participate in this conversation.