Too many redirects error when connecting this backend to the frontend
queenshandicraft
HOBBYOP

2 years ago

I am working on medusa js, I have deployed my backend and admin panel here and storefront on vercel.

When I run the backend locally and connect frontend to it, I face no issues but when I connect the backend deployed here to the storefront I get too many redirects error, I faced same error when connecting backend to storefront running locally on my machine.

I checked the network logs, when connected to backend running locally it sends one redirect 307 request and redirects to the default region, but when connecting to backend running on railway it keeps on sending 307 requests and eventually gives too many redirects error. I directly tried to go to /[region] endpoint but still same issue of endless redirects.

Please guide me on what to do.

4 Replies

2 years ago

Hello,

As this issue is also happening locally we would not be able to assist here.

We unfortunately cannot provide application level support.

I wish you all the best debugging your issue.


queenshandicraft
HOBBYOP

2 years ago

The issue is happening locally only if I connect the locally running "STORE FRONT" to the railway backend.
If I am running backend locally and connect it to storefront there are no issues.
Hope you get what I am trying to say.


2 years ago

Yes I understand what you are saying, unfortunately it doesn't change much, this is an issue with your backend, Railway is not sending that redirect, your own application is.


queenshandicraft

The issue is happening locally only if I connect the locally running "STORE FRONT" to the railway backend.If I am running backend locally and connect it to storefront there are no issues.Hope you get what I am trying to say.

bonkboykz
PRO

9 months ago

Hi there! I don't know if it'll help, but I've got the exact same issue. Turns out I forgot to set all the countries in the default region on the staging backend of medusa specifically. After that the storefront properly showed the main page.


Loading...