fix: enable http request (#2159)

This commit is contained in:
Finley Ge
2024-07-25 14:39:22 +08:00
committed by GitHub
parent 87dac54f1e
commit 55cefccad1

View File

@@ -155,7 +155,7 @@ const HttpPluginEditModal = ({
/* load api from url */
const { mutate: onClickUrlLoadApi, isLoading: isLoadingUrlApi } = useRequest({
mutationFn: async () => {
if (!schemaUrl || !schemaUrl.startsWith('https://')) {
if (!schemaUrl || (!schemaUrl.startsWith('https://') && !schemaUrl.startsWith('http://'))) {
return toast({
title: t('common:plugin.Invalid URL'),
status: 'warning'