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
48708ca0
Unverified
Commit
48708ca0
authored
Oct 19, 2024
by
Jeffrey Morgan
Committed by
GitHub
Oct 19, 2024
Browse files
server: allow vscode-webview origin (#7273)
parent
c7cb0f06
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 @
48708ca0
...
@@ -72,6 +72,7 @@ func Origins() (origins []string) {
...
@@ -72,6 +72,7 @@ func Origins() (origins []string) {
"app://*"
,
"app://*"
,
"file://*"
,
"file://*"
,
"tauri://*"
,
"tauri://*"
,
"vscode-webview://*"
,
)
)
return
origins
return
origins
...
...
envconfig/config_test.go
View file @
48708ca0
...
@@ -68,6 +68,7 @@ func TestOrigins(t *testing.T) {
...
@@ -68,6 +68,7 @@ func TestOrigins(t *testing.T) {
"app://*"
,
"app://*"
,
"file://*"
,
"file://*"
,
"tauri://*"
,
"tauri://*"
,
"vscode-webview://*"
,
}},
}},
{
"http://10.0.0.1"
,
[]
string
{
{
"http://10.0.0.1"
,
[]
string
{
"http://10.0.0.1"
,
"http://10.0.0.1"
,
...
@@ -86,6 +87,7 @@ func TestOrigins(t *testing.T) {
...
@@ -86,6 +87,7 @@ func TestOrigins(t *testing.T) {
"app://*"
,
"app://*"
,
"file://*"
,
"file://*"
,
"tauri://*"
,
"tauri://*"
,
"vscode-webview://*"
,
}},
}},
{
"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"
,
...
@@ -105,6 +107,7 @@ func TestOrigins(t *testing.T) {
...
@@ -105,6 +107,7 @@ func TestOrigins(t *testing.T) {
"app://*"
,
"app://*"
,
"file://*"
,
"file://*"
,
"tauri://*"
,
"tauri://*"
,
"vscode-webview://*"
,
}},
}},
{
"http://totally.safe,http://definitely.legit"
,
[]
string
{
{
"http://totally.safe,http://definitely.legit"
,
[]
string
{
"http://totally.safe"
,
"http://totally.safe"
,
...
@@ -124,6 +127,7 @@ func TestOrigins(t *testing.T) {
...
@@ -124,6 +127,7 @@ func TestOrigins(t *testing.T) {
"app://*"
,
"app://*"
,
"file://*"
,
"file://*"
,
"tauri://*"
,
"tauri://*"
,
"vscode-webview://*"
,
}},
}},
}
}
for
_
,
tt
:=
range
cases
{
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