Next 13 API responses just froze after build
This logic is supposed to return the current date when the end point is requested, it works fine on dev mode, but this endpoint response is frozen/cached after i run build, can someone clarify what is happening? I'm even doing the best i can on headers response and in client to turn this page like a getServerSideProps page
5 Replies
It might be because you donβt actually use
request
at all, not entirely sure thothat's right, but i'm not sure how i'm supposed to use the request on that endpoint logic, there is nothing dynamic
https://beta.nextjs.org/docs/routing/route-handlers#dynamic-route-handlers
Routing: Route Handlers | Next.js
Route Handlers are a new way to create custom request handlers for a given route. All HTTP methods are supported, including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.
could you send back a piece of data from the request maybe?
or i wonder if doing
request.something;
inside the function is enough to make next think it's dynamicline 47 was all i need mate, we tricked him
thanks dude π§βπ
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View