localhost openExternal rewrite loses URL /path
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- web-dev
Hướng nghiên cứu
Bắt đầu với patches/proxy-uri.diff và lời gọi resolveExternalUri được xác định trong báo cáo; tái hiện hành vi bằng lệnh browser.sh và URL chứa /my/path. Kiểm tra cách URL được viết lại xử lý đường dẫn, sau đó cũng xác minh các tham số truy vấn và anchor. Hoàn thành khi URL proxy được viết lại giữ nguyên hậu tố của URL ban đầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 79.4k
- Fork
- 6.9k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 39
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/code-server
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
coder/code-server#8017 · 2 bình luận ·
-
Bump proxy-addr to 2.0.8 Đang mởsecurity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
coder/code-server#8013 · 4 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
coder/code-server#7976 · 2 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
coder/code-server#7962 · 3 bình luận ·
-
bug needs-investigation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
coder/code-server#7955 · 1 bình luận ·
Tất cả issue của coder/code-server
Issue tương tự
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Mend: dependency security vulnerability untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100