File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
frontend/src/views/website/website/config/basic/proxy/create Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -234,16 +234,13 @@ const submit = async (formEl: FormInstance | undefined) => {
234234};
235235
236236const getProtocolAndHost = (url : string ): { protocol: string ; host: string } | null => {
237- const regex = / ^ (https? :\/\/ )([^ \/ ] + )/ ;
238- const match = url .match (regex );
239- if (match ) {
240- return {
241- protocol: match [1 ],
242- host: match [2 ],
243- };
237+ if (url .startsWith (' https://' )) {
238+ return { protocol: ' https' , host: url .replaceAll (' https://' , ' ' ) };
244239 }
245- console .log (' err' );
246- return null ;
240+ if (url .startsWith (' http://' )) {
241+ return { protocol: ' http' , host: url .replaceAll (' http://' , ' ' ) };
242+ }
243+ return { protocol: ' ' , host: url };
247244};
248245
249246defineExpose ({
You can’t perform that action at this time.
0 commit comments