`/config` hardcodes `ws://` for the MQTT WebSocket URL, which breaks the UI when served over HTTPS (mixed content)
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start in src/frontend/server.js, where /config currently returns the MQTT WebSocket URL, and find the browser code that reads that configuration. Trace how the browser connects to /mqtt and publishes orders, then check the relevant frontend tests or run the project’s documented test command. Done means HTTPS pages use a secure WebSocket and HTTP pages still connect successfully.
Written by the indexing model from the issue text.
Description
Summary
src/frontend/server.js returns the browser's MQTT WebSocket URL with a fixed scheme:
mqttWsUrl: `ws://${req.headers.host}/mqtt`,
When the frontend is served over HTTPS (an ingress or reverse proxy with TLS, which is the normal production setup and typically required for OIDC), browsers block ws:// from an https:// page as mixed content. The browser publishes orders to orders/new over this connection, so order placement fails. Depending on the browser, the connection error can also stop the rest of the page initialisation.
Suggested fix
Return only the path from /config (e.g. mqttWsPath: '/mqtt'), and build the URL in the browser:
const wsUrl = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}${config.mqttWsPath}`;
This works behind any TLS-terminating proxy without relying on forwarded headers or trust proxy settings.
- Dominant language
- Rust
- Stars
- 5
- Forks
- 3
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/adaptive-apps
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/adaptive-apps#59 ·
Maintainers usually reply within 2 days
-
help wanted Microhack
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/adaptive-apps#28 ·
Maintainers usually reply within 2 days
-
Create Microhack Challenge 08 Coach guideMay be free again @gowrishacv claimed this 43 days ago, and no pull request is open. Openhelp wanted Microhack
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microsoft/adaptive-apps#27 · 1 comment ·
Maintainers usually reply within 2 days
-
help wanted Microhack
Difficulty 2/5 Half a day Newbie friendliness 68/100
microsoft/adaptive-apps#26 ·
Maintainers usually reply within 2 days
-
help wanted Microhack
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/adaptive-apps#25 ·
Maintainers usually reply within 2 days
All issues in microsoft/adaptive-apps
Similar issues
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agentic-os-org/ANOLISA#6742 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
git-ai-project/git-ai#2406 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Kc1t/alethe-agents#312 ·
Maintainers usually reply within 3 days