diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2023-05-03 13:31:04 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2023-05-03 13:31:04 -0400 |
| commit | 2b6b14bd171bcffc2ca0f61d0dd7b35e86f0be0e (patch) | |
| tree | 17d31dcdb7caa3f57443cd4bcb1a2969b38a6dec | |
| parent | 97a8370caea2fae4a0a67165036aae2dc2d05900 (diff) | |
Proxy Fix and requirements.txt
| -rwxr-xr-x | main.py | 4 | ||||
| -rw-r--r-- | requirements.txt | 4 | ||||
| -rwxr-xr-x | static/articles/flaskwebsite/dbbak.py | 8 | ||||
| -rw-r--r-- | static/articles/flaskwebsite/flaskwebsite.md | 6 | ||||
| -rwxr-xr-x | static/articles/flaskwebsite/flaskwebsite.sync-conflict-20230503-132338-Q37XHXN.md | 1 |
5 files changed, 23 insertions, 0 deletions
@@ -1,8 +1,12 @@ from flask import Flask, render_template, send_file from markdown import markdown from db import DB +from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) +app.wsgi_app = ProxyFix( + app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1 +) r = DB() @app.route('/') diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3fc1f39 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +Flask==2.2.3 +Markdown==3.4.3 +redis==4.5.4 +Werkzeug==2.2.3 diff --git a/static/articles/flaskwebsite/dbbak.py b/static/articles/flaskwebsite/dbbak.py new file mode 100755 index 0000000..9756cdd --- /dev/null +++ b/static/articles/flaskwebsite/dbbak.py @@ -0,0 +1,8 @@ +db_entry = { + "title": "Running a Flask based website on Nginx", + "date": "05/03/2023", + "file": "static/articles/flaskwebsite/flaskwebsite.md", + "desc": "A tutorial on setting up the Flask website on Nginx", + "url": "flaskwebsite", + "id": 2 +} diff --git a/static/articles/flaskwebsite/flaskwebsite.md b/static/articles/flaskwebsite/flaskwebsite.md new file mode 100644 index 0000000..c08da37 --- /dev/null +++ b/static/articles/flaskwebsite/flaskwebsite.md @@ -0,0 +1,6 @@ +# Running a Flask based website on Nginx + +This article assumes you have completed up to setting up Nginx based on the [Last Article](/articles/rpilinuxserver/), or that you already have a server setup. + +## + diff --git a/static/articles/flaskwebsite/flaskwebsite.sync-conflict-20230503-132338-Q37XHXN.md b/static/articles/flaskwebsite/flaskwebsite.sync-conflict-20230503-132338-Q37XHXN.md new file mode 100755 index 0000000..792d600 --- /dev/null +++ b/static/articles/flaskwebsite/flaskwebsite.sync-conflict-20230503-132338-Q37XHXN.md @@ -0,0 +1 @@ +# |
