[Bug]: Docker nginx.conf Accept header handling incorrect when passing in multiple types #5128
Open
5 tasks done
Labels
bug
Something isn't working
Requirements
Summary
I think that the nginx.conf file included with Lemmy doesn't handle the
Accept
header properly. If you have multiple options, it doesn't pick the preferred option. There should be no functional difference betweenAccept: application/activity+json
&Accept: application/activity+json, application/ld+json
, but it seems like there is.I could be totally wrong about this. But it seems like when there are multiple accepted types passed into the header it doesn't handle that properly.
Steps to Reproduce
Accept: application/activity+json
(notice that response returns JSON)curl https://eventfrontier.com/c/travel -H "Accept: application/activity+json"
Accept: application/activity+json, application/ld+json
(notice that response returns HTML)curl https://eventfrontier.com/c/travel -H "Accept: application/activity+json, application/ld+json"
I expect steps 2 & 3 to return the same result.
Technical Details
Logs:
proxy-1 | 2024-10-19T20:17:13.082095893Z 172.31.0.1 - - [19/Oct/2024:20:17:13 +0000] "GET /c/travel HTTP/1.1" 200 1074 "-" "curl/8.7.1"
proxy-1 | 2024-10-19T20:17:27.367621427Z 172.31.0.1 - - [19/Oct/2024:20:17:27 +0000] "GET /c/travel HTTP/1.1" 200 13430 "-" "curl/8.7.1"
OS: Ubuntu 22.04.5 LTS
Browser Console Errors: Not relevant since I'm making requests directly using curl
Version
BE: 0.19.4
Lemmy Instance URL
eventfrontier.com
The text was updated successfully, but these errors were encountered: