spatie/laravel-google-fonts on local environment with e.g. laragon shows “blocked: mixed content” when served over HTTPS

Problem:

You use the famous https://github.com/spatie/laravel-google-fonts/, but on local development or laragon you get “blocked: mixed content”, when you call your app with HTTPS.

Solution:

  • Change APP_URL in .env to your HTTPS Hostname
  • Don’t forget php artisan storage:link
  • AFTER changing your APP_URL to HTTPS, do a php artisan google-fonts:fetch
  • Then, after a npm run dev or vite build , the fonts should be served correctly over HTTPS