Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
0b06ef3b
Verified
Commit
0b06ef3b
authored
Mar 30, 2020
by
Eliot Berriot
Browse files
Fix #1065: irrelevant redirection to HTML repr of a library
parent
5bb9112a
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/federation/utils.py
View file @
0b06ef3b
...
...
@@ -215,6 +215,7 @@ def should_redirect_ap_to_html(accept_header, default=True):
"text/html"
,
]
no_redirect_headers
=
[
"*/*"
,
# XXX backward compat with older Funkwhale instances that don't send the Accept header
"application/json"
,
"application/activity+json"
,
"application/ld+json"
,
...
...
api/tests/federation/test_views.py
View file @
0b06ef3b
...
...
@@ -371,6 +371,11 @@ def test_music_upload_detail_private_approved_follow(
(
"text/html,application/xhtml+xml"
,
True
,
True
),
(
"text/html,application/json"
,
True
,
True
),
(
""
,
True
,
False
),
(
"*/*"
,
True
,
False
,
),
# XXX: compat with older versions of Funkwhale that miss the Accept header
(
None
,
True
,
False
),
(
"application/json"
,
True
,
False
),
(
"application/activity+json"
,
True
,
False
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment