R
Railway2y ago
demo

CSS blocked:mixed-content for gunicorn server | HTTPS | FastAPI | Serving HTML

project id: 22ce14b2-4953-42e3-aed4-b106fa5da66e/service/c5ee3e3a-1864-440a-bd31-c67e7acf0494?id=e9b90c2c-08f4-4a71-a49d-841e02ec614e Stack: Python FastAPI server that serves HTML+CSS Issue: I see a page with no css applied and a network tab that indicates it was blocked due to "mixed-content" Expected outcome: I see the page with css applied Relevant Links: https://github.com/tiangolo/fastapi/issues/2611 https://www.uvicorn.org/deployment/#running-with-https Possible Solution: Do I have access to the ssl keyfile? If so, I can just specify it in the commandline.
Deployment - Uvicorn
The lightning-fast ASGI server.
9 Replies
Percy
Percy2y ago
Project ID: 22ce14b2-4953-42e3-aed4-b106fa5da66e,c5ee3e3a-1864-440a-bd31-c67e7acf0494,e9b90c2c-08f4-4a71-a49d-841e02ec614e
Percy
Percy2y ago
You might find these helpful: - disabling ssl/http option?
⚠️ experimental feature
Brody
Brody2y ago
can you send your apps domain?
Brody
Brody2y ago
this doesnt have anything to do with anything you linked youre trying to access your css over http, just change the href to use relative paths this <link rel="stylesheet" href="http://news-aggregator-production.up.railway.app/static/output.css" /> becomes <link rel="stylesheet" href="./static/output.css" />
demo
demoOP2y ago
it's amazing how dumb I am sometimes i swear a write code for a living
Brody
Brody2y ago
doubt
demo
demoOP2y ago
:(
Brody
Brody2y ago
haha no worries, we all make mistakes
Want results from more Discord servers?
Add your server