Change login from http basic auth to cookies

This commit is contained in:
Yukino Song
2024-08-30 06:17:02 +08:00
parent c0e65632f6
commit 652661ea50
11 changed files with 289 additions and 109 deletions

View File

@@ -283,7 +283,9 @@
}
},
created() {
fetch("/api/config")
fetch("/api/config", {
credentials: 'include'
})
.then((r) => r.json())
.then((r) => {
this.config = r;
@@ -372,6 +374,7 @@
});
return fetch("/api/config", {
credentials: 'include',
method: "POST",
body: JSON.stringify(config),
}).then((r) => {