Add instructions for creating and using a self-signed SSL certificate in README.md

This commit is contained in:
2025-12-28 18:14:53 +01:00
parent 2884cd91a8
commit 1b2bb83eeb

View File

@@ -28,3 +28,17 @@ Copy the `app.py` file to your desired location, and run it using Python:
```bash ```bash
flask run app.py flask run app.py
``` ```
## Self-Signed SSL Certificate (Optional)
To run the Flask app with HTTPS, you can create a self-signed SSL certificate:
```bash
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
```
Then run the Flask app with SSL context:
```bash
flask run --cert=cert.pem --key=key.pem
```