Erwin
01/01/2022, 9:09 AMErwin
01/01/2022, 9:12 AMsteranevdy
01/01/2022, 9:17 AMdfcowell
01/01/2022, 10:24 AMErwin
01/01/2022, 12:52 PMsteranevdy
01/01/2022, 12:52 PMWalshy | Pages
01/01/2022, 1:19 PMsteranevdy
01/01/2022, 1:26 PMWalshy | Pages
01/01/2022, 1:26 PMWalshy | Pages
01/01/2022, 1:26 PMErwin
01/01/2022, 2:24 PMsteranevdy
01/01/2022, 2:27 PMsandeepsihari
01/02/2022, 7:14 AM404
on /api/auth/send-otp
(file structure functions/api/auth/send-otp.js
) but working fine for the root level api i.e /api
npx wrangler pages dev --binding JWT_SECRET_KEY="this is super secret key" TEXTLOCAL_SENDER_ID="ADHOMS" --kv OTP --proxy 3000 -- npx next dev
did anyone else faced similar issue?sandeepsihari
01/02/2022, 7:22 AM/api/index.js
route. everything else is throwing 404
amithm7
01/02/2022, 3:05 PMwrangler2
(@beta) using miniflare
behaves quite differently to actual pages function. For example: https://github.com/cloudflare/wrangler2/issues/165#issuecomment-1003532637William | Chaos Management
01/02/2022, 4:51 PMJames
01/02/2022, 4:53 PMcache.put
etc. APIs and construct dummy responses to store it if you wanted, and don't really care about when it's not cached, since that's colo specific. KV is probably your best option though if you don't want to go external.James
01/02/2022, 4:54 PMWalshy | Pages
01/02/2022, 4:55 PMWilliam | Chaos Management
01/02/2022, 4:56 PMWalshy | Pages
01/02/2022, 4:56 PMJames
01/02/2022, 4:56 PMcache.match
works with Request
objects, so yeah you could create one that's defined with a query string, etc.Walshy | Pages
01/02/2022, 4:56 PMWilliam | Chaos Management
01/02/2022, 4:57 PMJames
01/02/2022, 4:57 PMWilliam | Chaos Management
01/02/2022, 4:57 PMJames
01/02/2022, 4:58 PMWilliam | Chaos Management
01/02/2022, 4:59 PMWalshy | Pages
01/02/2022, 4:59 PMWalshy | Pages
01/02/2022, 4:59 PM