From: Felix Ableitner Date: Wed, 16 Dec 2020 17:24:14 +0000 (+0100) Subject: Handle long activitystreams header in nginx config (ref #1322) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7BpictrsAvatarThumbnail%28this.props.site.site.icon%29%7D?a=commitdiff_plain;h=db0a51de2aaa6dcab8f7d2f28b5afe39db42a325;p=lemmy.git Handle long activitystreams header in nginx config (ref #1322) --- diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 91fcd931..84b9c665 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -61,6 +61,9 @@ server { if ($http_accept = "application/activity+json") { set $proxpass "http://0.0.0.0:{{ lemmy_port }}"; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass "http://0.0.0.0:{{ lemmy_port }}"; + } if ($request_method = POST) { set $proxpass "http://0.0.0.0:{{ lemmy_port }}"; } diff --git a/docker/federation/nginx.conf b/docker/federation/nginx.conf index 003f88dc..357b87c9 100644 --- a/docker/federation/nginx.conf +++ b/docker/federation/nginx.conf @@ -28,6 +28,9 @@ http { if ($http_accept = "application/activity+json") { set $proxpass http://lemmy-alpha; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass http://lemmy-alpha; + } proxy_pass $proxpass; proxy_set_header X-Real-IP $remote_addr; @@ -70,6 +73,9 @@ http { if ($http_accept = "application/activity+json") { set $proxpass http://lemmy-beta; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass http://lemmy-beta; + } proxy_pass $proxpass; proxy_set_header X-Real-IP $remote_addr; @@ -112,6 +118,9 @@ http { if ($http_accept = "application/activity+json") { set $proxpass http://lemmy-gamma; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass http://lemmy-gamma; + } proxy_pass $proxpass; proxy_set_header X-Real-IP $remote_addr; @@ -154,6 +163,9 @@ http { if ($http_accept = "application/activity+json") { set $proxpass http://lemmy-delta; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass http://lemmy-delta; + } proxy_pass $proxpass; proxy_set_header X-Real-IP $remote_addr; @@ -196,6 +208,9 @@ http { if ($http_accept = "application/activity+json") { set $proxpass http://lemmy-epsilon; } + if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") { + set $proxpass http://lemmy-epsilon; + } proxy_pass $proxpass; proxy_set_header X-Real-IP $remote_addr;