Repository navigation
Fix: wrap livereload.js in DEBUG conditional - #2543
Merged
k9ert merged 1 commit intoMar 19, 2026
Merged
Conversation
✅ Deploy Preview for specter-desktop-docs canceled.
|
k9ert
approved these changes
Feb 10, 2026
The livereload.js script tag in base.jinja loads unconditionally in
production, causing:
- Mixed content warnings (HTTP script on HTTPS pages)
- Failed network requests to port 35729 on every page load
- Console errors for all users
Wrap it in {% if config.DEBUG %} so it only loads during development.
Fixes cryptoadvance#2460
k9ert
force-pushed
the
fix/remove-livereload-production
branch
from
March 19, 2026 12:47
8bafae8 to
53e4a17
Compare
Copilot AI
added a commit
that referenced
this pull request
Apr 17, 2026
- Accepted master's simpler config.DEBUG check instead of SPECTER_CONFIGURATION_CLASS_FULLNAME - Removed test_livereload_conditional.py since the fix is already in master via PR #2543 Co-authored-by: k9ert <117085+k9ert@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
livereload.jsscript tag inbase.jinjaloads unconditionally — including in production. This causes:localhost:35729on every page loadFix
Wrap the script tag in
{% if config.DEBUG %}so it only loads during development.Before
After
{% if config.DEBUG %} <script>document.write('<script src="http://...livereload.js..."></' + 'script>')</script> {% endif %}Fixes #2460