localhost openExternal rewrite loses URL /path
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 52/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- À l'abandon
- Stack technique
- typescript
- Domaine
- web-dev
Piste de recherche
Commencez par patches/proxy-uri.diff et l’appel à resolveExternalUri identifié dans le rapport ; reproduisez le comportement avec la commande browser.sh et l’URL contenant /my/path. Vérifiez comment l’URL réécrite gère le chemin, puis vérifiez également les paramètres de requête et les ancres. C’est terminé lorsque l’URL du proxy réécrite préserve le suffixe de l’URL d’origine.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
/usr/lib/code-server/lib/vscode/bin/helpers/browser.sh http://127.0.0.1:1234/my/path- Opens URL
https://coder.<domain>/@<user>/<instance>/apps/code-server/proxy/1234/ - Be saddened by the observation that
/my/pathwas 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.
- Langage dominant
- TypeScript
- Étoiles
- 79.4k
- Forks
- 6.9k
- Merge moyen
- 2 j 13 h
- PR mergées (30 j)
- 39
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de coder/code-server
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
coder/code-server#8017 · 2 commentaires ·
-
Bump proxy-addr to 2.0.8 Ouvertesecurity
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
coder/code-server#8013 · 4 commentaires ·
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
coder/code-server#7976 · 2 commentaires ·
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
coder/code-server#7962 · 3 commentaires ·
-
bug needs-investigation
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
coder/code-server#7955 · 1 commentaire ·
Toutes les issues de coder/code-server
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
TanStack/tanstack.com#1293 ·