Skip to content

fix: enable WebUI without --http-record and update docs#8

Open
pepedd864 wants to merge 1 commit into
burpheart:mainfrom
pepedd864:fix/webui-and-docs
Open

fix: enable WebUI without --http-record and update docs#8
pepedd864 wants to merge 1 commit into
burpheart:mainfrom
pepedd864:fix/webui-and-docs

Conversation

@pepedd864

@pepedd864 pepedd864 commented Apr 30, 2026

Copy link
Copy Markdown

Bug Fix: WebUI not working without --http-record

Reproduce:

  1. Start proxy with go run ./cmd/cursor-tap start --http-parse (without --http-record)
  2. Open WebUI, browser console shows Failed to fetch on /api/records
  3. /api/records returns 404, /ws/records WebSocket connection fails

Root Cause:
The /api/records and /ws/records routes are only registered when s.recorder != nil (see internal/proxy/server.go:499-505). However, the recorder is only created when --http-record is specified (see internal/proxy/server.go:93-110). This means the WebUI API endpoints are unavailable unless the user also provides a file path for recording, which is not obvious from the README.

Fix:

  • internal/httpstream/recorder.go: Allow NewRecorder to work with empty file path (in-memory only mode). Skip file operations when path is empty, but still maintain memory cache and callbacks for WebSocket broadcasting.
  • internal/proxy/server.go: Always create recorder when --http-parse is enabled, regardless of --http-record. If --http-record is also specified, records are written to file as before; otherwise in-memory only.

Docs: Multiple inaccuracies in README

  • Wrong command path: go run ./cmd/proxygo run ./cmd/cursor-tap start --http-parse
  • Missing --http-parse flag: WebUI depends on this flag but it was never mentioned
  • Wrong CA cert path: ~/.cursor-tap/ca.crt~/.cursor-tap/ca/ca.crt (code generates it in ca/ subdirectory)
  • Missing lowercase proxy env vars: Node.js prioritizes http_proxy/https_proxy over uppercase versions
  • Missing macOS keychain step: Electron (Cursor) uses Chromium networking stack which ignores NODE_EXTRA_CA_CERTS; must install CA to system keychain via sudo security add-trusted-cert
  • Missing terminal launch instruction: open -a Cursor does not inherit environment variables
  • Wrong project structure: cmd/proxy/cmd/cursor-tap/, missing api/ and mitm/ directories

Related Issues

Closes #1 - Fixed wrong command path cmd/proxycmd/cursor-tap
Closes #9 - Fixed WebUI not working without --http-record

- Allow NewRecorder to work without file path (in-memory only mode)
- Always create recorder when --http-parse is enabled, so /api/records
  and /ws/records routes are registered regardless of --http-record
- Fix README: wrong command path, missing --http-parse flag, wrong CA
  cert path, missing lowercase proxy env vars, missing macOS keychain
  install step, wrong project structure
- Fix README_EN: same issues as above
@takeseem

takeseem commented May 4, 2026

Copy link
Copy Markdown

It's good, but api3.cursor.sh is pin certs. can't cap any in api3

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.

WebUI not working without --http-record flag cmd/proxy: directory not found

2 participants