Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

localhost openExternal rewrite loses URL /path

Chiusa
#7,668 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
web-dev

Direzione di ricerca

Inizia da patches/proxy-uri.diff e dalla chiamata a resolveExternalUri identificata nel report; riproduci il comportamento con il comando browser.sh e l’URL contenente /my/path. Controlla come l’URL riscritto gestisce il percorso, quindi verifica anche i parametri di query e gli anchor. Il lavoro è completato quando l’URL del proxy riscritto preserva il suffisso dell’URL originale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug triage
Is there an existing issue for this?
  • I have searched the existing issues
OS/Web Information
  • Web Browser: chrome
  • Local OS: macOS
  • Remote OS: Linux/Ubuntu
  • Remote Architecture: amd64
  • code-server --version: 1.107.0
Steps to Reproduce
  1. /usr/lib/code-server/lib/vscode/bin/helpers/browser.sh http://127.0.0.1:1234/my/path
  2. Opens URL https://coder.<domain>/@<user>/<instance>/apps/code-server/proxy/1234/
  3. Be saddened by the observation that /my/path was dropped during the rewrite.
Expected

Should have rewritten to URL https://coder.<domain>/@<user>/<instance>/apps/code-server/proxy/1234/my/path (with trailing /my/path). When I update the URL in my browser to do this, this works - so the proxy itself is doing all the right things, it's just the rewrite that is incorrect afaics.

I have not explored with query params or anchors. Given what I see in the code, I suspect these are lost too.

Actual

Opened URL https://coder.<domain>/@<user>/<instance>/apps/code-server/proxy/1234/

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in VS Code web?

I did not test VS Code web

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?
  • I am using a secure context.
Notes

I believe the relevant code is part of this code-server patch, and not vscode:
https://github.com/coder/code-server/blob/main/patches/proxy-uri.diff

From a squint at this patch, I think the new URL(renderedTemplate, window.location.href) call in resolveExternalUri is suspect. I don't see anything here that would copy through anything after the host portion of the URL.

Lingua principale
TypeScript
Stelle
79.4k
Fork
6.9k
Merge medio
2g 13h
PR unite (30g)
39

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/code-server

Tutte le issue di coder/code-server

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.