Commit 55cefcca by Finley Ge Committed by GitHub

fix: enable http request (#2159)

parent 87dac54f
...@@ -155,7 +155,7 @@ const HttpPluginEditModal = ({ ...@@ -155,7 +155,7 @@ const HttpPluginEditModal = ({
/* load api from url */ /* load api from url */
const { mutate: onClickUrlLoadApi, isLoading: isLoadingUrlApi } = useRequest({ const { mutate: onClickUrlLoadApi, isLoading: isLoadingUrlApi } = useRequest({
mutationFn: async () => { mutationFn: async () => {
if (!schemaUrl || !schemaUrl.startsWith('https://')) { if (!schemaUrl || (!schemaUrl.startsWith('https://') && !schemaUrl.startsWith('http://'))) {
return toast({ return toast({
title: t('common:plugin.Invalid URL'), title: t('common:plugin.Invalid URL'),
status: 'warning' status: 'warning'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment