mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Log authenticated fetch
This commit is contained in:
parent
06462ec8ff
commit
8355fa9597
1 changed files with 8 additions and 0 deletions
8
app.py
8
app.py
|
@ -436,6 +436,10 @@ def outbox():
|
|||
|
||||
@app.route("/outbox/<item_id>")
|
||||
def outbox_detail(item_id):
|
||||
sig = request.headers.get("Signature")
|
||||
if sig:
|
||||
app.logger.info(f"received an authenticated fetch: {sig}")
|
||||
|
||||
doc = DB.activities.find_one(
|
||||
{
|
||||
"box": Box.OUTBOX.value,
|
||||
|
@ -454,6 +458,10 @@ def outbox_detail(item_id):
|
|||
|
||||
@app.route("/outbox/<item_id>/activity")
|
||||
def outbox_activity(item_id):
|
||||
sig = request.headers.get("Signature")
|
||||
if sig:
|
||||
app.logger.info(f"received an authenticated fetch: {sig}")
|
||||
|
||||
data = find_one_activity(
|
||||
{**in_outbox(), **by_remote_id(activity_url(item_id)), **is_public()}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue