From 7484795ce5100c73586ffc66269ee186435d752a Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 19 Oct 2023 00:13:47 +0000 Subject: [PATCH] Fix app load failure. --- cista/__main__.py | 4 ++-- cista/httpredir.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cista/__main__.py b/cista/__main__.py index 5042baa..2035480 100755 --- a/cista/__main__.py +++ b/cista/__main__.py @@ -4,10 +4,10 @@ from pathlib import Path from docopt import docopt -from . import app, config, droppy, serve +from . import app, config, droppy, serve, httpredir from ._version import version -app # Needed for Sanic multiprocessing +app, httpredir.app # Needed for Sanic multiprocessing doc = f"""Cista {version} - A file storage for the web. diff --git a/cista/httpredir.py b/cista/httpredir.py index 2f1bf50..8b03213 100644 --- a/cista/httpredir.py +++ b/cista/httpredir.py @@ -11,7 +11,7 @@ def redirect_everything_else(request, exception): return response.text("Bad Request. Please use HTTPS!", status=400) # ACME challenge for LetsEncrypt -app.get("/.well-known/acme-challenge/") +@app.get("/.well-known/acme-challenge/") async def letsencrypt(request, challenge): try: return response.text(acme_challenges[challenge])