mirror of
https://github.com/ollama/ollama.git
synced 2025-09-27 18:07:03 +02:00
server: allow vscode-webview origin (#7273)
This commit is contained in:
@@ -72,6 +72,7 @@ func Origins() (origins []string) {
|
|||||||
"app://*",
|
"app://*",
|
||||||
"file://*",
|
"file://*",
|
||||||
"tauri://*",
|
"tauri://*",
|
||||||
|
"vscode-webview://*",
|
||||||
)
|
)
|
||||||
|
|
||||||
return origins
|
return origins
|
||||||
|
@@ -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) {
|
|||||||
"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) {
|
|||||||
"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) {
|
|||||||
"app://*",
|
"app://*",
|
||||||
"file://*",
|
"file://*",
|
||||||
"tauri://*",
|
"tauri://*",
|
||||||
|
"vscode-webview://*",
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
for _, tt := range cases {
|
for _, tt := range cases {
|
||||||
|
Reference in New Issue
Block a user