Docker Dev vs Prod - Differing /admin/members/ behavior

Hello all. I’ve got Ghost running as a headless CMS on a docker network connected to a Flask App. I have a route that adds an email to the newsletter via api call to /ghost/api/admin/members/. In my dev environment it is successful:

ghost-1       | [2024-02-27 16:23:35] INFO "POST /ghost/api/admin/members/" 201 449ms

In prod the authorization fails. I’ve verified the admin key is correct (have even tried regenerating). In prod it the same POST request gets directed:

rblncd-ghost-1       | [2024-02-27 16:21:45] INFO "POST /ghost/api/admin/members/" 301 195ms
rblncd-ghost-1       | [2024-02-27 16:21:45] ERROR "GET /ghost/api/admin/members/" 403 5ms

I am wondering if the token is getting lost in the redirect, something along those lines.

Has anyone run into this before or know why the same image is behaving differently between the two environments?

Do you maybe have dev using the same URL for front site and dashboard, but prod uses a different url for admin panel vs the front site? That could trigger a redirect, if prod doesn’t like the domain you’re using…

EDIT 3: Thanks for putting me on the trail @Cathy_Sarisky ! Potentially hacky solution, but what ended up working was creating a separate GHOST_ADMIN_URL environment variable and passing that to admin api calls to prevent the redirect.