79276299

Date: 2024-12-12 19:06:59
Score: 1.5
Natty:
Report link

If you ever find this topic and the same issue. For me it was that Laravel was pointing to http and not https. Seems legit in a development environment... but not for production.

So whats the solution? This: https://stackoverflow.com/a/61313133/4892914

Your AppServiceProvider.php, boot() function should look like this:

public function boot(): void
{
    Vite::prefetch(concurrency: 3); // optional ofc

    if (env('APP_ENV') === 'production') {
        \Illuminate\Support\Facades\URL::forceScheme('https');
    }
}
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
Posted by: Adam