Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

localhost openExternal rewrite loses URL /path

クローズ
#7,668 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
web-dev

調査の方向性

patches/proxy-uri.diff と、レポートで特定された resolveExternalUri の呼び出しから始めます。browser.sh コマンドと /my/path を含む URL を使って動作を再現します。書き換えられた URL がパスをどのように扱うかを確認し、クエリパラメータとアンカーも検証します。書き換えられたプロキシ URL が元の URL のサフィックスを保持していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
79.4k
フォーク
6.9k
平均マージ
2日 13時間
マージ済み PR(30日)
39

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/code-server のほかの issue

coder/code-server の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。