Browse Source

checkpoint

webui
Antonio SJ Musumeci 18 hours ago
parent
commit
6e22afef1f
  1. 6
      index.html
  2. 6
      src/mergerfs_webui.cpp

6
index.html

@ -1306,8 +1306,8 @@
}
},
async getAuthSalt() {
const response = await this.request('/auth/salt');
async getAuth() {
const response = await this.request('/auth');
const data = await response.json();
this.passwordRequired = data.password_required;
return data;
@ -2471,7 +2471,7 @@
// Authentication functions
async function initAuth() {
try {
const authInfo = await API.getAuthSalt();
const authInfo = await API.getAuth();
AppState.passwordRequired = authInfo.password_required;
API.passwordRequired = authInfo.password_required;

6
src/mergerfs_webui.cpp

@ -473,8 +473,8 @@ _post_kvs_key(const httplib::Request &req_,
static
void
_get_auth_salt(const httplib::Request &req_,
httplib::Response &res_)
_get_auth(const httplib::Request &req_,
httplib::Response &res_)
{
json j;
@ -588,7 +588,7 @@ mergerfs::webui::main(const int argc_,
httplib::Server http_server;
http_server.Get("/",::_get_root);
http_server.Get("/auth/salt",::_get_auth_salt);
http_server.Get("/auth",::_get_auth);
http_server.Post("/auth/verify",::_post_auth_verify);
http_server.Get("/mounts",::_get_mounts);
http_server.Get("/mounts/mergerfs",::_get_mounts_mergerfs);

Loading…
Cancel
Save