mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 20:49:23 +02:00
See #192: use proper content type for nodeinfo endpoint
This commit is contained in:
parent
a679f48fcf
commit
095b70db4b
2 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,11 @@ from . import nodeinfo
|
|||
from . import stats
|
||||
|
||||
|
||||
NODEINFO_2_CONTENT_TYPE = (
|
||||
'application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.0#; charset=utf-8' # noqa
|
||||
)
|
||||
|
||||
|
||||
class InstanceSettings(views.APIView):
|
||||
permission_classes = []
|
||||
authentication_classes = []
|
||||
|
@ -38,4 +43,5 @@ class NodeInfo(views.APIView):
|
|||
if not preferences.get('instance__nodeinfo_enabled'):
|
||||
return Response(status=404)
|
||||
data = nodeinfo.get()
|
||||
return Response(data, status=200)
|
||||
return Response(
|
||||
data, status=200, content_type=NODEINFO_2_CONTENT_TYPE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue