diff --git a/envconfig/config.go b/envconfig/config.go index 44a87995..db2a5625 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 7ac7c53e..735b4540 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 {