mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
Tweak the webfinger response
This commit is contained in:
parent
7eb52884b8
commit
0b8e0896c1
1 changed files with 7 additions and 7 deletions
14
app.py
14
app.py
|
@ -690,6 +690,7 @@ def wellknown_nodeinfo():
|
||||||
@app.route("/.well-known/webfinger")
|
@app.route("/.well-known/webfinger")
|
||||||
def wellknown_webfinger():
|
def wellknown_webfinger():
|
||||||
"""Enable WebFinger support, required for Mastodon interopability."""
|
"""Enable WebFinger support, required for Mastodon interopability."""
|
||||||
|
# TODO(tsileo): move this to little-boxes?
|
||||||
resource = request.args.get("resource")
|
resource = request.args.get("resource")
|
||||||
if resource not in [f"acct:{USERNAME}@{DOMAIN}", ID]:
|
if resource not in [f"acct:{USERNAME}@{DOMAIN}", ID]:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
@ -708,13 +709,12 @@ def wellknown_webfinger():
|
||||||
"rel": "http://ostatus.org/schema/1.0/subscribe",
|
"rel": "http://ostatus.org/schema/1.0/subscribe",
|
||||||
"template": BASE_URL + "/authorize_follow?profile={uri}",
|
"template": BASE_URL + "/authorize_follow?profile={uri}",
|
||||||
},
|
},
|
||||||
# {"rel": "magic-public-key", "href": KEY.to_magic_key()},
|
{"rel": "magic-public-key", "href": KEY.to_magic_key()},
|
||||||
# {"rel": "salmon", "href": BASE_URL + "/salmon"},
|
{
|
||||||
# {
|
"href": BASE_URL,
|
||||||
# "rel": "http://schemas.google.com/g/2010#updates-from",
|
"rel": "http://webfinger.net/rel/profile-page",
|
||||||
# "type": "application/atom+xml",
|
"type": "text/html",
|
||||||
# "href": f"{BASE_URL}/fake_feed",
|
},
|
||||||
# },
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue