]> Untitled Git - lemmy.git/blobdiff - docker/federation/nginx.conf
Merge branch 'master' into federation_merge_from_master_2
[lemmy.git] / docker / federation / nginx.conf
index c0633ea424289c35f6b69a7d7185015e584e7212..25160eb6c497db913414efdf95df32b10f1ac17d 100644 (file)
@@ -23,11 +23,16 @@ http {
             proxy_set_header Connection "upgrade";
         }
 
-        location /pictshare/ {
-            proxy_pass http://pictshare_alpha:80/;
+        # pict-rs images
+        location /pictrs {
+          location /pictrs/image {
+            proxy_pass http://pictrs_alpha:8080/image;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header Host $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          }
+          # Block the import
+          return 403;
         }
 
         location /iframely/ {
@@ -58,11 +63,56 @@ http {
             proxy_set_header Connection "upgrade";
         }
 
-        location /pictshare/ {
-            proxy_pass http://pictshare_beta:80/;
+        # pict-rs images
+        location /pictrs {
+          location /pictrs/image {
+            proxy_pass http://pictrs_beta:8080/image;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header Host $host;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          }
+          # Block the import
+          return 403;
+        }
+
+        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;
+        }
+    }
+
+    server {
+        listen 8560;
+        server_name 127.0.0.1;
+        access_log off;
+
+        # Upload limit for pictshare
+        client_max_body_size 50M;
+
+        location / {
+            proxy_pass http://lemmy_gamma:8560;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header Host $host;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+            # WebSocket support
+            proxy_http_version 1.1;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection "upgrade";
+        }
+
+        # pict-rs images
+        location /pictrs {
+          location /pictrs/image {
+            proxy_pass http://pictrs_gamma:8080/image;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header Host $host;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          }
+          # Block the import
+          return 403;
         }
 
         location /iframely/ {