Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

Enable HTTPS using Uvicorn

$
0
0

I tried this tutorial (https://dev.to/rajshirolkar/fastapi-over-https-for-development-on-windows-2p7d) and then when I went to my browser but I cannot access my localhost address using https, if I try http it works but I need to use HTTPS.

Here is the code I tried:

import uvicornif __name__ == "__main__":    uvicorn.run("app.api:app",                 host="localhost",                 port=8432,                  reload=True,                 ssl_keyfile="./key.pem",                  ssl_certfile="./cert.pem")

Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>