fix(gnoweb): update ts URL construction in _fetchQEval to handle existing http protocols
Added normalizeRemoteURL() function in main.go to ensure the remote URL has a valid HTTP(S) protocol before being used by the frontend and CSP.
tcp://is converted tohttp://(RPC uses HTTP over TCP)- Missing protocol defaults to
http://(local) http://andhttps://are kept as-is- Updated
SecureHeadersMiddlewareto use the normalized URL for CSPconnect-src - This prevents malformed URLs (e.g., http://https://...) and allows users to use
-remote tcp://...seamlessly.
Note: The root cause may be a misconfigured remote value in production (e.g., missing the : in https://). This fix handles the symptom, but the remote URL configuration might also be verified just in case.
🛠 PR Checks Summary
All Automated Checks passed. ✅
Manual Checks (for Reviewers):
- [ ] IGNORE the bot requirements for this PR (force green CI check)
Read More
🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.
✅ Automated Checks (for Contributors):
🟢 Maintainers must be able to edit this pull request (more info) 🟢 Changes related to gnoweb must be reviewed by its codeowners
☑️ Contributor Actions:
- Fix any issues flagged by automated checks.
- Follow the Contributor Checklist to ensure your PR is ready for review.
- Add new tests, or document why they are unnecessary.
- Provide clear examples/screenshots, if necessary.
- Update documentation, if required.
- Ensure no breaking changes, or include
BREAKING CHANGEnotes. - Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
- Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 The pull request was created from a fork (head branch repo: alexiscolin/gno)Then
🟢 Requirement satisfied └── 🟢 Maintainer can modify this pull requestChanges related to gnoweb must be reviewed by its codeowners
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 A changed file matches this pattern: ^gno.land/pkg/gnoweb/ (filename: gno.land/pkg/gnoweb/frontend/js/controller-action-function.ts)Then
🟢 Requirement satisfied └── 🟢 Or ├── 🟢 Or │ ├── 🟢 And │ │ ├── 🟢 Pull request author is user: alexiscolin │ │ └── 🟢 This user reviewed pull request: gfanton (with state "APPROVED") │ └── 🔴 And │ ├── 🔴 Pull request author is user: gfanton │ └── 🔴 This user reviewed pull request: alexiscolin (with state "APPROVED") └── 🔴 And ├── 🔴 Not (🟢 Pull request author is user: alexiscolin) ├── 🟢 Not (🔴 Pull request author is user: gfanton) └── 🟢 Or ├── 🔴 This user reviewed pull request: alexiscolin (with state "APPROVED") └── 🟢 This user reviewed pull request: gfanton (with state "APPROVED")Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)
If
🟢 Condition met └── 🟢 On every pull requestCan be checked by
- Any user with comment edit permission
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:loudspeaker: Thoughts on this report? Let us know!