Aggressive deploy cache redirects everything to my login page

I have a SvelteKit app running on a web service and I believe I’m having an issue with Render aggressively caching my pages during deployment.

Here is what I’m seeing in the deploy logs:

Apr 16 10:46:15 PM     302 / -> /login
Apr 16 10:46:15 PM     302 /associations -> /login
Apr 16 10:46:15 PM     302 /artifacts -> /login
Apr 16 10:46:15 PM     302 /places -> /login
Apr 16 10:46:15 PM     302 /items -> /login
Apr 16 10:46:15 PM     302 /races -> /login
Apr 16 10:46:15 PM     302 /npcs -> /login

The reason that they are all redirecting to the login page is because the app redirects there, server side, for an unauthenticated user. The login page, in turn, redirects to / for an authenticated user. So, when an authenticated user hits my home page, render is redirecting them to /login based on the cache created on deployment (I believe), which then redirects to /, and back and forth ad infinitum.

I might expect such an aggressive cache on a 301 redirect, but given that I’m returning 302s this seems excessive. Is there a way I can turn off or change that caching?

Hi Scott,

Thanks for reaching out.

Render Web Services don’t currently provide caching on the running service and the only default redirects are 301s from http to https.

From what you’ve described it feels like code/configuration issue if the app is returning the 302s when a request is made. Is the session be correctly stored/passed? Is there any logic that may be triggering incorrectly? Can you see the requests for each if the redirects hitting the service in the logs?

I’m not a SvelteKit expert, but if you’re able to share some further details that may help us troubleshoot it with you, e.g. any further logs/errors/output, service ID, reproduction steps, etc. If you don’t want to share those kind of details on the community forum, please feel free to raise a ticket with

Kind regards


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.