Skip to content

Commit

Permalink
🐛 fix: 内联默认的 索引 URL,解决外部使用问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 29, 2023
1 parent cb51fbf commit 54b93d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ import {
pluginRequestPayloadSchema,
} from '@lobehub/chat-plugin-sdk';

const DEFAULT_PLUGINS_INDEX_URL = 'https://chat-plugins.lobehub.com';

/**
* create Gateway Edge Function with plugins index url
* @param pluginsIndexUrl
*/
export const createLobeChatPluginGateway = (pluginsIndexUrl: string) => {
export const createLobeChatPluginGateway = (
pluginsIndexUrl: string = DEFAULT_PLUGINS_INDEX_URL,
) => {
return async (req: Request) => {
// ========== 1. 校验请求方法 ========== //
if (req.method !== 'POST')
Expand Down

0 comments on commit 54b93d2

Please sign in to comment.