Assets (app.css, app.js) fail to load - Attempting HTTPS on HTTP local development #444
Unanswered
rodrigo1608
asked this question in
Q&A
Replies: 1 comment
-
Hey @rodrigo1608 , I just tried to reproduce it, but it worked well for me. ![]() A few things you could check:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After installing Log Viewer via Composer (
composer require opcodesio/log-viewer
) and publishing its assets (php artisan log-viewer:publish
), I encountered an issue where theapp.css
andapp.js
files were not loading when accessing the Log Viewer interface (configured athttp://localhost:8000/log-viewer
).Upon inspecting the browser's network tab, I observed that the requests for these assets were being made using
https://localhost:8000/...
, despite my.env
file havingAPP_URL=http://localhost
and my local development server (php artisan serve
) running on HTTP. This mismatch in protocols prevented the assets from loading, resulting in a broken UI with error messages indicating the failure.Steps to Reproduce:
APP_URL=http://localhost
is set in your Laravel.env
file.composer require opcodesio/log-viewer
.php artisan log-viewer:publish
.http://localhost:8000/log-viewer
.app.css
andapp.js
with URLs starting withhttps://localhost:8000
.Current Workaround:
I was able to temporarily resolve this by manually editing the
/vendor/opcodesio/log-viewer/resources/views/index.blade.php
file and directly setting thehref
andsrc
attributes of the<link>
and<script>
tags to usehttp://localhost:8000/...
:Beta Was this translation helpful? Give feedback.
All reactions