Skip to content

Validate API base URL in settings - #144

Merged
manoahLinks merged 3 commits into
mind-vault-1:mainfrom
deep-bhikadiya:issue-84-api-url-validation
Jul 31, 2026
Merged

Validate API base URL in settings#144
manoahLinks merged 3 commits into
mind-vault-1:mainfrom
deep-bhikadiya:issue-84-api-url-validation

Conversation

@deep-bhikadiya

Copy link
Copy Markdown
Contributor

Summary

  • Add API base URL validation before saving settings changes.
  • Allow HTTPS API hosts while still supporting HTTP localhost, loopback, and private LAN IP development URLs.
  • Reject incomplete URLs, unsupported schemes, public HTTP URLs, credentials, query parameters, and fragments.

Backend assumptions

  • Public API base URLs should use HTTPS.
  • HTTP is only supported for local development targets such as localhost, loopback, and private LAN IPs.

Verification

  • npm run typecheck passes.
  • Added focused validator coverage in src/api/apiSettings.test.ts.
  • Manual UI verification note: Settings save now shows an Invalid URL alert with the specific validation message before saving invalid API base URLs.

Note

  • npx jest src/api/apiSettings.test.ts --runInBand is currently blocked by the repo Jest runtime mismatch: this._moduleMocker.clearMocksOnScope is not a function, before test bodies execute.

close #84

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@deep-bhikadiya Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

… into issue-84-api-url-validation

# Conflicts:
#	package-lock.json
#	package.json
@manoahLinks
manoahLinks merged commit c102c5d into mind-vault-1:main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API base URL validation in settings

2 participants