MazeMage
CDCloudflare Developers
•Created by MazeMage on 3/10/2025 in #workers-help
OpenNext worker apis not working properly in deployed environment
ok I fixed it. The wrangler version was outdated and after the update everything worked
6 replies
CDCloudflare Developers
•Created by MazeMage on 3/10/2025 in #workers-help
OpenNext worker apis not working properly in deployed environment

6 replies
CDCloudflare Developers
•Created by MazeMage on 3/10/2025 in #workers-help
OpenNext worker apis not working properly in deployed environment
I'm not very proficient with js/ts but this is what I found online suggested to do it. I was also even more confused because on local environment it was working as expected
6 replies
CDCloudflare Developers
•Created by MazeMage on 3/10/2025 in #workers-help
OpenNext worker apis not working properly in deployed environment
this api is supposed to be triggered by a button on click from my page component, this is the call
6 replies
CDCloudflare Developers
•Created by MazeMage on 3/10/2025 in #workers-help
OpenNext worker apis not working properly in deployed environment
ok didn't know that thanks. I was trying to log it because I was trying to extract the body from the request, which is what I need to process. The problem is that when I tried to do so with
an error occurs
which to me it seems like the body is empty. Is this approach of extracting it wrong?
6 replies
CDCloudflare Developers
•Created by MazeMage on 3/5/2025 in #workers-help
KV store in NextJs App
one more question, since I'm a nooby with nextjs. I have a component, where i want to use a secret. from the docs i see the env is accessable only in routers. is there any way to do it safely? the only way i can think of is to make api route, and call it inside the component, but this would make the route accessable to anybody, which defeats the purpose. is there a way to secure it?
10 replies
CDCloudflare Developers
•Created by MazeMage on 3/5/2025 in #workers-help
KV store in NextJs App
opennext, these docs are what i was looking for exactly, thank you
10 replies
CDCloudflare Developers
•Created by MazeMage on 3/5/2025 in #workers-help
KV store in NextJs App
thank you, can I ask as well what is the best/easiest way to read a CF secret in a nextjs worker?
10 replies
CDCloudflare Developers
•Created by MazeMage on 3/5/2025 in #workers-help
KV store in NextJs App
thank you for the answer, aren't they doing the same thing in this case (storing some small data and retrieving it when needed)? I was thinking they both kinda do the same. I tried even this approach:
but the kv const is undefined when I try to call it. Also I was wondering is the workers approach better than the pages for nextjs?
10 replies