POST being redirected to HTTP instead of HTTPS

Hi, I have a FastAPI API deployed on Runway, but my frontend keeps failing to POST to it due to a mixed content HTTP error. The URL I'm sending the request to is the correct HTTPS one, but it seems it's being redirected. Could you please help point me in the right direction to fix this?
9 Replies
Percy
Percy16mo ago
Project ID: 092f02c5-b080-4291-b0aa-eb14ac78ce54
large_carbon_model
092f02c5-b080-4291-b0aa-eb14ac78ce54
Brody
Brody16mo ago
show me a screenshot of where the request originates in code please
large_carbon_model
This is the request in the frontend (not hosted on Railway), with API_BASE_URL equal to my Railway generated domain with HTTPS.
Brody
Brody16mo ago
alright, show me the network request in the browsers dev tools now please
Brody
Brody16mo ago
your app (not railway!) is sending a 307 temporary redirect to the non https address it was requested from
large_carbon_model
Thank you so much, I'm an idiot 🤦‍♂️
Brody
Brody16mo ago
no youre not
Want results from more Discord servers?
Add your server