Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
dc13813a
Unverified
Commit
dc13813a
authored
Feb 28, 2025
by
Eries Trisnadi
Committed by
GitHub
Feb 27, 2025
Browse files
server: allow vscode-file origins (#9313)
parent
d6af13ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
envconfig/config.go
envconfig/config.go
+1
-0
envconfig/config_test.go
envconfig/config_test.go
+4
-0
No files found.
envconfig/config.go
View file @
dc13813a
...
...
@@ -73,6 +73,7 @@ func AllowedOrigins() (origins []string) {
"file://*"
,
"tauri://*"
,
"vscode-webview://*"
,
"vscode-file://*"
,
)
return
origins
...
...
envconfig/config_test.go
View file @
dc13813a
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment