mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-14 18:54:27 +00:00
Try to verify authenticated fetches
This commit is contained in:
parent
e31ae7997d
commit
5ce114c2e1
1 changed files with 7 additions and 0 deletions
7
app.py
7
app.py
|
@ -210,6 +210,13 @@ def _log_sig():
|
||||||
sig = request.headers.get("Signature")
|
sig = request.headers.get("Signature")
|
||||||
if sig:
|
if sig:
|
||||||
app.logger.info(f"received an authenticated fetch: {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
|
# App routes
|
||||||
|
|
Loading…
Reference in a new issue