We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c233b85 commit ed6c255Copy full SHA for ed6c255
client/src/middleware.ts
@@ -5,16 +5,12 @@ const API_SERVER_URL = process.env.API_SERVER_URL || 'http://localhost:5100';
5
6
// Middleware to handle API requests
7
export const onRequest = defineMiddleware(async (context, next) => {
8
- console.log('Request URL:', context.request.url);
9
10
// Guard clause: if not an API request, pass through to regular Astro handling
11
if (!context.request.url.includes('/api/')) {
12
return await next();
13
}
14
15
- // API request handling
16
- console.log('Forwarding request to server:', API_SERVER_URL);
17
-
18
const url = new URL(context.request.url);
19
const apiPath = url.pathname + url.search;
20
0 commit comments