Skip to content

Commit e612435

Browse files
committed
trying to deploy this on vercel
1 parent 83ca86d commit e612435

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

api/index.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from werkzeug.middleware.proxy_fix import ProxyFix
2+
3+
from app import app as flask_app
4+
5+
flask_app.wsgi_app = ProxyFix(
6+
flask_app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1
7+
)
8+
9+
app = flask_app

app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,3 +1728,7 @@ def participant_logout():
17281728

17291729
if __name__ == "__main__":
17301730
app.run(debug=True)
1731+
1732+
1733+
def handler(request, *args):
1734+
return app(request.environ, lambda status, headers: None)

vercel.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"functions": {
3+
"api/index.py": {
4+
"runtime": "python3.11"
5+
}
6+
},
7+
"rewrites": [
8+
{
9+
"source": "/(.*)",
10+
"destination": "/api/index.py"
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)