Support X-Remote-User in web UI

This commit is contained in:
Max Berger
2026-03-22 15:56:04 +01:00
parent 8178b11e9e
commit 07685c292f
6 changed files with 261 additions and 46 deletions

View File

@@ -18,7 +18,7 @@
import { ROOT_PATH, SERVER } from "../constants.js";
import { CollectionType } from "../models/collection.js";
import { to_error_message } from "./common.js";
import { create_request, to_error_message } from "./common.js";
/**
* @typedef {Object} SharingFeatures
@@ -56,13 +56,11 @@ function call_sharing_api(
on_not_found = null,
on_error = null,
) {
let request = new XMLHttpRequest();
request.open(
let request = create_request(
"POST",
SERVER + ROOT_PATH + ".sharing/v1/" + path,
true,
user,
encodeURIComponent(password),
password,
);
request.onreadystatechange = function () {
if (request.readyState !== 4) {