R
Railway16mo 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
Percy16mo ago
Project ID: 22ce14b2-4953-42e3-aed4-b106fa5da66e,c5ee3e3a-1864-440a-bd31-c67e7acf0494,e9b90c2c-08f4-4a71-a49d-841e02ec614e
Percy
Percy16mo ago
You might find these helpful: - disabling ssl/http option?
⚠️ experimental feature
Brody
Brody16mo ago
can you send your apps domain?
Brody
Brody16mo 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
demo16mo ago
it's amazing how dumb I am sometimes i swear a write code for a living
Brody
Brody16mo ago
doubt
demo
demo16mo ago
:(
Brody
Brody16mo ago
haha no worries, we all make mistakes
Want results from more Discord servers?
Add your server
More Posts