Fix app load failure.
This commit is contained in:
parent
a00610a738
commit
7484795ce5
|
@ -4,10 +4,10 @@ from pathlib import Path
|
||||||
|
|
||||||
from docopt import docopt
|
from docopt import docopt
|
||||||
|
|
||||||
from . import app, config, droppy, serve
|
from . import app, config, droppy, serve, httpredir
|
||||||
from ._version import version
|
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.
|
doc = f"""Cista {version} - A file storage for the web.
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ def redirect_everything_else(request, exception):
|
||||||
return response.text("Bad Request. Please use HTTPS!", status=400)
|
return response.text("Bad Request. Please use HTTPS!", status=400)
|
||||||
|
|
||||||
# ACME challenge for LetsEncrypt
|
# ACME challenge for LetsEncrypt
|
||||||
app.get("/.well-known/acme-challenge/<challenge>")
|
@app.get("/.well-known/acme-challenge/<challenge>")
|
||||||
async def letsencrypt(request, challenge):
|
async def letsencrypt(request, challenge):
|
||||||
try:
|
try:
|
||||||
return response.text(acme_challenges[challenge])
|
return response.text(acme_challenges[challenge])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user