🎨 Improve S3/WebDAV endpoint setting https://ld246.com/article/1736518497899

This commit is contained in:
Daniel 2025-01-11 22:03:54 +08:00
parent cb4b2f8507
commit 632cf38c52
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -318,6 +318,7 @@ const bindProviderEvent = () => {
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
let endpoint = (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value;
endpoint = endpoint.trim().replace("http://http(s)://", "https://");
endpoint = endpoint.replace("http(s)://", "https://");
if (!endpoint.startsWith("http")) {
endpoint = "http://" + endpoint;
}
@ -353,6 +354,7 @@ const bindProviderEvent = () => {
(providerPanelElement.querySelector("#timeout") as HTMLInputElement).value = timeout.toString();
let endpoint = (providerPanelElement.querySelector("#endpoint") as HTMLInputElement).value;
endpoint = endpoint.trim().replace("http://http(s)://", "https://");
endpoint = endpoint.replace("http(s)://", "https://");
if (!endpoint.startsWith("http")) {
endpoint = "http://" + endpoint;
}