Route is cached. Can't clear it even after ending server.
I had a hono app running a route as such:
The
postRoute
is a standard json return which works fine. However, in the authRoute
, the endpoint /authorize
seems to be cached and never updates when I make changes to it. As a matter of fact, the endpoint is still accessible even after removing it from the first file provided above AND even after ending the server. Here is the snippet of this endpoint:
This endpoint is supposed to redirect to Spotify auth (which did work until I wanted to make some changes). I've been trying to fix this for hours. Please help a brother out.1 Reply
Nevermind, I found the solution! Apparently sending back a status of
301
will cache the redirect since it indicates a permanent redirection of a URL. Instead, I sent back a 302
which indicates the move is temporary.
Source: https://stackoverflow.com/questions/8136315/how-to-avoid-browser-redirect-caching