Unverified Commit dc13813a authored by Eries Trisnadi's avatar Eries Trisnadi Committed by GitHub
Browse files

server: allow vscode-file origins (#9313)

parent d6af13ef
...@@ -73,6 +73,7 @@ func AllowedOrigins() (origins []string) { ...@@ -73,6 +73,7 @@ func AllowedOrigins() (origins []string) {
"file://*", "file://*",
"tauri://*", "tauri://*",
"vscode-webview://*", "vscode-webview://*",
"vscode-file://*",
) )
return origins return origins
......
...@@ -69,6 +69,7 @@ func TestOrigins(t *testing.T) { ...@@ -69,6 +69,7 @@ func TestOrigins(t *testing.T) {
"file://*", "file://*",
"tauri://*", "tauri://*",
"vscode-webview://*", "vscode-webview://*",
"vscode-file://*",
}}, }},
{"http://10.0.0.1", []string{ {"http://10.0.0.1", []string{
"http://10.0.0.1", "http://10.0.0.1",
...@@ -88,6 +89,7 @@ func TestOrigins(t *testing.T) { ...@@ -88,6 +89,7 @@ func TestOrigins(t *testing.T) {
"file://*", "file://*",
"tauri://*", "tauri://*",
"vscode-webview://*", "vscode-webview://*",
"vscode-file://*",
}}, }},
{"http://172.16.0.1,https://192.168.0.1", []string{ {"http://172.16.0.1,https://192.168.0.1", []string{
"http://172.16.0.1", "http://172.16.0.1",
...@@ -108,6 +110,7 @@ func TestOrigins(t *testing.T) { ...@@ -108,6 +110,7 @@ func TestOrigins(t *testing.T) {
"file://*", "file://*",
"tauri://*", "tauri://*",
"vscode-webview://*", "vscode-webview://*",
"vscode-file://*",
}}, }},
{"http://totally.safe,http://definitely.legit", []string{ {"http://totally.safe,http://definitely.legit", []string{
"http://totally.safe", "http://totally.safe",
...@@ -128,6 +131,7 @@ func TestOrigins(t *testing.T) { ...@@ -128,6 +131,7 @@ func TestOrigins(t *testing.T) {
"file://*", "file://*",
"tauri://*", "tauri://*",
"vscode-webview://*", "vscode-webview://*",
"vscode-file://*",
}}, }},
} }
for _, tt := range cases { for _, tt := range cases {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment