Eries Trisnadi
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
0 deletions
-
envconfig/config.go
-
envconfig/config_test.go
|
|
|
@ -73,6 +73,7 @@ func AllowedOrigins() (origins []string) { |
|
|
|
"file://*", |
|
|
|
"tauri://*", |
|
|
|
"vscode-webview://*", |
|
|
|
"vscode-file://*", |
|
|
|
) |
|
|
|
|
|
|
|
return origins |
|
|
|
|
|
|
|
@ -69,6 +69,7 @@ func TestOrigins(t *testing.T) { |
|
|
|
"file://*", |
|
|
|
"tauri://*", |
|
|
|
"vscode-webview://*", |
|
|
|
"vscode-file://*", |
|
|
|
}}, |
|
|
|
{"http://10.0.0.1", []string{ |
|
|
|
"http://10.0.0.1", |
|
|
|
@ -88,6 +89,7 @@ func TestOrigins(t *testing.T) { |
|
|
|
"file://*", |
|
|
|
"tauri://*", |
|
|
|
"vscode-webview://*", |
|
|
|
"vscode-file://*", |
|
|
|
}}, |
|
|
|
{"http://172.16.0.1,https://192.168.0.1", []string{ |
|
|
|
"http://172.16.0.1", |
|
|
|
@ -108,6 +110,7 @@ func TestOrigins(t *testing.T) { |
|
|
|
"file://*", |
|
|
|
"tauri://*", |
|
|
|
"vscode-webview://*", |
|
|
|
"vscode-file://*", |
|
|
|
}}, |
|
|
|
{"http://totally.safe,http://definitely.legit", []string{ |
|
|
|
"http://totally.safe", |
|
|
|
@ -128,6 +131,7 @@ func TestOrigins(t *testing.T) { |
|
|
|
"file://*", |
|
|
|
"tauri://*", |
|
|
|
"vscode-webview://*", |
|
|
|
"vscode-file://*", |
|
|
|
}}, |
|
|
|
} |
|
|
|
for _, tt := range cases { |
|
|
|
|