Try to verify authenticated fetches

This commit is contained in:
Thomas Sileo 2019-08-19 23:35:14 +02:00
parent e31ae7997d
commit 5ce114c2e1

7
app.py
View file

@ -210,6 +210,13 @@ def _log_sig():
sig = request.headers.get("Signature")
if sig:
app.logger.info(f"received an authenticated fetch: {sig}")
try:
req_verified, actor_id = verify_request(
request.method, request.path, request.headers, None
)
app.logger.info(f"authenticated fetch: {req_verified}: {actor_id}")
except Exception:
app.logger.exception("failed to verify authenticated fetch")
# App routes