Tweak the webfinger response

This commit is contained in:
Thomas Sileo 2018-07-04 00:40:23 +02:00
parent 7eb52884b8
commit 0b8e0896c1

14
app.py
View file

@ -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", },
# },
], ],
} }