Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
3d776e40
Commit
3d776e40
authored
Apr 21, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Add credentials: 'same-origin' to all fetch requests in cache_settings.html
parent
0c7ea415
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
antani_sqlite_db_3f9c7e7f.sqlite3
antani_sqlite_db_3f9c7e7f.sqlite3
+0
-0
cache_settings.html
templates/dashboard/cache_settings.html
+11
-3
No files found.
antani_sqlite_db_3f9c7e7f.sqlite3
deleted
100644 → 0
View file @
0c7ea415
templates/dashboard/cache_settings.html
View file @
3d776e40
...
...
@@ -66,7 +66,9 @@ document.addEventListener('DOMContentLoaded', function() {
async
function
loadCacheSettings
()
{
try
{
const
response
=
await
fetch
(
'{{ url_for(request, "/api/user/cache-settings") }}'
);
const
response
=
await
fetch
(
'{{ url_for(request, "/api/user/cache-settings") }}'
,
{
credentials
:
'same-origin'
});
const
data
=
await
response
.
json
();
cacheSettings
=
data
.
settings
||
[];
renderCacheSettings
();
...
...
@@ -78,7 +80,9 @@ async function loadCacheSettings() {
async
function
loadUserProviders
()
{
try
{
const
response
=
await
fetch
(
'{{ url_for(request, "/api/user/providers") }}'
);
const
response
=
await
fetch
(
'{{ url_for(request, "/api/user/providers") }}'
,
{
credentials
:
'same-origin'
});
const
data
=
await
response
.
json
();
userProviders
=
data
.
providers
||
[];
...
...
@@ -133,6 +137,7 @@ async function setCacheSetting(provider_id, model_name, enabled) {
const
response
=
await
fetch
(
'{{ url_for(request, "/api/user/cache-settings") }}'
,
{
method
:
'POST'
,
headers
:
{
'Content-Type'
:
'application/json'
},
credentials
:
'same-origin'
,
body
:
JSON
.
stringify
({
provider_id
:
provider_id
||
null
,
model_name
:
model_name
||
null
,
...
...
@@ -179,7 +184,10 @@ async function deleteCacheSetting(provider_id, model_name) {
if
(
provider_id
)
url
.
searchParams
.
append
(
'provider_id'
,
provider_id
);
if
(
model_name
)
url
.
searchParams
.
append
(
'model_name'
,
model_name
);
const
response
=
await
fetch
(
url
,
{
method
:
'DELETE'
});
const
response
=
await
fetch
(
url
,
{
method
:
'DELETE'
,
credentials
:
'same-origin'
});
if
(
response
.
ok
)
{
showToast
(
'Cache setting deleted'
,
'success'
);
...
...
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