This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Use quality values in Accept field to explicitly prefer JSON over HTML (
#12806
)
master
ThibG
4 years ago
committed by
Eugen Rochko
parent
817d4a9372
commit
c306978190
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/services/fetch_resource_service.rb
+ 1
- 1
app/services/fetch_resource_service.rb
View File
@ -3,7 +3,7 @@
class
FetchResourceService
<
BaseService
include
JsonLdHelper
ACCEPT_HEADER
=
'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html'
ACCEPT_HEADER
=
'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html
;q=0.1
'
def
call
(
url
)
return
if
url
.
blank?
Write
Preview
Loading…
Cancel
Save