railwayapp-templates / fastapi Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
App shows that it is running fine in deploy logs below when using https but fails when using browser and shows Application Error.
Creating virtualenv ro-server-9TtSrW0h-py3.10 in /root/.cache/pypoetry/virtualenvs
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on https://0.0.0.0:5733/ (Press CTRL+C to quit)
I've spent the last while trying to figure out how to properly deploy fastapi with https on railway; even though railway handles the reverse proxy for us, for some reason when my frontend fetches to the proper railway (https://abcdefg.production.up.railway.app
) URL, it returns a response with the Location set to http
automatically, while giving this error:
I did finally manage to get it to work with uvicorn src.api:app --host 0.0.0.0 --port $PORT --proxy-headers --forwarded-allow-ips '*'
(where '*' would be replaced with the ips).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.