Add .json url for host-meta and fix host-meta problem of not having 'links'
authorxray7224 <jessica@megworld.co.uk>
Tue, 3 Sep 2013 16:24:24 +0000 (17:24 +0100)
committerJessica Tallon <jessica@megworld.co.uk>
Tue, 22 Jul 2014 22:13:14 +0000 (23:13 +0100)
mediagoblin/federation/routing.py
mediagoblin/federation/views.py

index daf60d00c45425bd99e4d39db77df249d34b5b31..be6451e0009695d165e15aacd9aa992ea6b0e57f 100644 (file)
@@ -60,6 +60,12 @@ add_route(
     "mediagoblin.federation.views:host_meta"
     )
 
+add_route(
+    "mediagoblin.webfinger.well-known.host-meta.json",
+    "/.well-known/host-meta.json",
+    "mediagoblin.federation.views:host_meta"
+    )
+
 add_route(
     "mediagoblin.webfinger.whoami",
     "/api/whoami",
index 85bf154030d0923f9eab78a0d2c73767d7a44c30..c84956c371ba31d005593037cf3f730844adf06b 100644 (file)
@@ -120,7 +120,7 @@ def host_meta(request):
         "href": request.urlgen("mediagoblin.oauth.access_token", qualified=True),
         })
 
-    return json_response(links)
+    return json_response({"links": links})
 
 def whoami(request):
     """ This is /api/whoami - This is a HTTP redirect to api profile """