diff --git a/worker.js b/worker.js index 8153c4b..cce334d 100644 --- a/worker.js +++ b/worker.js @@ -27,6 +27,12 @@ export default { return handleOptions(); } + // Check if this is an API request (starts with /api/) + if (!path.startsWith('/api/')) { + // For non-API routes, pass through to Cloudflare Pages + return fetch(request); + } + // For GET requests, try to serve from cache first if (request.method === "GET") { // Create a cache key from the request URL @@ -2311,6 +2317,4 @@ async function createOrGetUser(request, env) { details: logError(error, { action: 'user_outer' }) }, 500); } - - } \ No newline at end of file