Handle long activitystreams header in nginx config (ref #1322)
authorFelix Ableitner <me@nutomic.com>
Wed, 16 Dec 2020 17:24:14 +0000 (18:24 +0100)
committerFelix Ableitner <me@nutomic.com>
Wed, 16 Dec 2020 17:24:14 +0000 (18:24 +0100)
ansible/templates/nginx.conf
docker/federation/nginx.conf

index 91fcd9318cd49f491621aff73b72e20d69b4247d..84b9c665648830977465113cfb4e8c2e7c30ceea 100644 (file)
@@ -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 }}";
       }
index 003f88dc027b1712e28d027c461a838e04cb85a9..357b87c90ec952ef4b9e8a08b851732052486818 100644 (file)
@@ -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;