From a365ea03330b87b0edd5cff9b34ecbb7fc031162 Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Mon, 7 Oct 2024 18:28:39 +0800 Subject: [PATCH] https --- frontend/src/client/core/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/client/core/request.ts b/frontend/src/client/core/request.ts index ef88096..ad2389e 100644 --- a/frontend/src/client/core/request.ts +++ b/frontend/src/client/core/request.ts @@ -72,7 +72,6 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { const encoder = config.ENCODE_PATH || encodeURI const path = options.url - .replace("{http", "https") .replace("{api-version}", config.VERSION) .replace(/{(.*?)}/g, (substring: string, group: string) => { if (options.path?.hasOwnProperty(group)) { @@ -81,7 +80,8 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { return substring }) - const url = config.BASE + path + let url = config.BASE + path + url = url.replace(/^http:\/\//i, 'https://') return options.query ? url + getQueryString(options.query) : url }