Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit693e5d9

Browse files
authored
fix: add global headers tovscodessh command (#7181)
1 parent56bf9cf commit693e5d9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎cli/vscodessh.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
// This command needs to remain stable for compatibility with
2828
// various VS Code versions, so it's kept separate from our
2929
// standard SSH command.
30-
func (*RootCmd)vscodeSSH()*clibase.Cmd {
30+
func (r*RootCmd)vscodeSSH()*clibase.Cmd {
3131
var (
3232
sessionTokenFilestring
3333
urlFilestring
@@ -82,6 +82,12 @@ func (*RootCmd) vscodeSSH() *clibase.Cmd {
8282
client:=codersdk.New(serverURL)
8383
client.SetSessionToken(string(sessionToken))
8484

85+
// This adds custom headers to the request!
86+
err=r.setClient(client,serverURL)
87+
iferr!=nil {
88+
returnxerrors.Errorf("set client: %w",err)
89+
}
90+
8591
parts:=strings.Split(inv.Args[0],"--")
8692
iflen(parts)<3 {
8793
returnxerrors.Errorf("invalid argument format. must be: coder-vscode--<owner>-<name>-<agent?>")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp