spesmilo / spesmilo/electrum-web

website hard to test locally; it requires a webserver. (problem when using file URIs)

Open
#10 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
105
Forks
81
PR merge metrics
No merged PRs in 30d

Description

The html files cannot be easily tested in a browser locally.
The website is broken when using the file:// protocol; it works when using http://,
so the workaround is to run a webserver locally.

Firefox (87.0) logs:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///.../electrum-web/panel-download.html. (Reason: CORS request not http).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///.../electrum-web/projects.json. (Reason: CORS request not http).

See https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem by opening the HTML files locally in Firefox with the file:// protocol, then compare that behavior with the working http:// setup. Inspect references involving panel-download.html and projects.json and use the reported Same-origin policy error as the starting point. Done means the website can be tested locally without the reported file-URI failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.