Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

server: allow vscode-webview origin (#7273)

Jeffrey Morgan48708ca0d50d
diff --git a/envconfig/config.go b/envconfig/config.go
index 44a879954..db2a56259 100644
--- a/envconfig/config.go
+++ b/envconfig/config.go
@@ -72,6 +72,7 @@ func Origins() (origins []string) {
"app://*",
"file://*",
"tauri://*",
+ "vscode-webview://*",
)
return origins
diff --git a/envconfig/config_test.go b/envconfig/config_test.go
index 7ac7c53e3..735b45405 100644
--- a/envconfig/config_test.go
+++ b/envconfig/config_test.go
@@ -68,6 +68,7 @@ func TestOrigins(t *testing.T) {
"app://*",
"file://*",
"tauri://*",
+ "vscode-webview://*",
}},
{"http://10.0.0.1", []string{
"http://10.0.0.1",
@@ -86,6 +87,7 @@ func TestOrigins(t *testing.T) {
"app://*",
"file://*",
"tauri://*",
+ "vscode-webview://*",
}},
{"http://172.16.0.1,https://192.168.0.1", []string{
"http://172.16.0.1",
@@ -105,6 +107,7 @@ func TestOrigins(t *testing.T) {
"app://*",
"file://*",
"tauri://*",
+ "vscode-webview://*",
}},
{"http://totally.safe,http://definitely.legit", []string{
"http://totally.safe",
@@ -124,6 +127,7 @@ func TestOrigins(t *testing.T) {
"app://*",
"file://*",
"tauri://*",
+ "vscode-webview://*",
}},
}
for _, tt := range cases {