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])