Skip to content

Commit 8b1a443

Browse files
authored
🐛 fix: fix gateway runtime (#24)
1 parent 84e360c commit 8b1a443

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/pages/api/gateway.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { createLobeChatPluginGateway } from '@lobehub/chat-plugins-gateway';
1+
import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway';
2+
3+
export const config = {
4+
runtime: 'edge',
5+
};
26

37
export default async (req: Request) => {
48
if (process.env.NODE_ENV === 'development') {
5-
return createLobeChatPluginGateway()(req);
9+
return createGatewayOnEdgeRuntime()(req);
610
}
711

8-
return;
12+
return new Response('gateway');
913
};

0 commit comments

Comments
 (0)