]> Untitled Git - lemmy.git/blobdiff - docker/federation/nginx.conf
add enable_federated_downvotes site option
[lemmy.git] / docker / federation / nginx.conf
index 003f88dc027b1712e28d027c461a838e04cb85a9..425371beee4816805fa75e0846e5b1d473b09adb 100644 (file)
@@ -17,7 +17,7 @@ http {
         # Upload limit for pictshare
         client_max_body_size 50M;
 
-        location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
+        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
             proxy_pass http://lemmy-alpha;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
@@ -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;
@@ -37,12 +40,6 @@ http {
             # Cuts off the trailing slash on URLs to make them valid
             rewrite ^(.+)/+$ $1 permanent;
         }
-        location /iframely/ {
-            proxy_pass http://iframely:80/;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header Host $host;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        }
     }
 
     upstream lemmy-beta {
@@ -59,7 +56,7 @@ http {
         # Upload limit for pictshare
         client_max_body_size 50M;
 
-        location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
+        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
             proxy_pass http://lemmy-beta;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
@@ -70,6 +67,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;
@@ -79,12 +79,6 @@ http {
             # Cuts off the trailing slash on URLs to make them valid
             rewrite ^(.+)/+$ $1 permanent;
         }
-        location /iframely/ {
-            proxy_pass http://iframely:80/;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header Host $host;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        }
     }
 
     upstream lemmy-gamma {
@@ -101,7 +95,7 @@ http {
         # Upload limit for pictshare
         client_max_body_size 50M;
 
-        location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
+        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
             proxy_pass http://lemmy-gamma;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
@@ -112,6 +106,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;
@@ -121,12 +118,6 @@ http {
             # Cuts off the trailing slash on URLs to make them valid
             rewrite ^(.+)/+$ $1 permanent;
         }
-        location /iframely/ {
-            proxy_pass http://iframely:80/;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header Host $host;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        }
     }
 
     upstream lemmy-delta {
@@ -143,7 +134,7 @@ http {
         # Upload limit for pictshare
         client_max_body_size 50M;
 
-        location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
+        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
             proxy_pass http://lemmy-delta;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
@@ -154,6 +145,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;
@@ -163,12 +157,6 @@ http {
             # Cuts off the trailing slash on URLs to make them valid
             rewrite ^(.+)/+$ $1 permanent;
         }
-        location /iframely/ {
-            proxy_pass http://iframely:80/;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header Host $host;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        }
     }
 
     upstream lemmy-epsilon {
@@ -185,7 +173,7 @@ http {
         # Upload limit for pictshare
         client_max_body_size 50M;
 
-        location ~ ^/(api|docs|pictrs|feeds|nodeinfo|.well-known) {
+        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
             proxy_pass http://lemmy-epsilon;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
@@ -196,6 +184,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;
@@ -205,11 +196,5 @@ http {
             # Cuts off the trailing slash on URLs to make them valid
             rewrite ^(.+)/+$ $1 permanent;
         }
-        location /iframely/ {
-            proxy_pass http://iframely:80/;
-            proxy_set_header X-Real-IP $remote_addr;
-            proxy_set_header Host $host;
-            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        }
     }
 }