From 64e16e6a4be83e9328d62101cc21d10cf07e38fb Mon Sep 17 00:00:00 2001 From: Sean King Date: Sat, 16 Jul 2022 23:44:37 -0600 Subject: Document way to do notice compatibility routes with Nginx reverse-proxy instead --- installation/pleroma.nginx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'installation/pleroma.nginx') diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 9890cb2b1..8aed2daea 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -81,6 +81,19 @@ server { proxy_pass http://phoenix; } + # Uncomment this if you want notice compatibility routes for frontends like Soapbox. + # location ~ /@.+/([^/]+) { + # proxy_pass http://phoenix/notice/$1; + # } + # + # location ~ /@.+/posts/([^/]+) { + # proxy_pass http://phoenix/notice/$1; + # } + # + # location ~ /.+/status/([^/]+) { + # proxy_pass http://phoenix/notice/$1; + # } + location ~ ^/(media|proxy) { proxy_cache pleroma_media_cache; slice 1m; -- cgit v1.2.3 From 2c7eed122e909f392e3d41efe43fc2b0b99fe842 Mon Sep 17 00:00:00 2001 From: Sean King Date: Sun, 17 Jul 2022 12:50:01 -0600 Subject: Don't accept forward slash character for nicknames --- installation/pleroma.nginx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'installation/pleroma.nginx') diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 8aed2daea..d53852984 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -82,15 +82,15 @@ server { } # Uncomment this if you want notice compatibility routes for frontends like Soapbox. - # location ~ /@.+/([^/]+) { + # location ~ /@([^/]+)/([^/]+) { # proxy_pass http://phoenix/notice/$1; # } # - # location ~ /@.+/posts/([^/]+) { + # location ~ /@([^/]+)/posts/([^/]+) { # proxy_pass http://phoenix/notice/$1; # } # - # location ~ /.+/status/([^/]+) { + # location ~ /([^/]+)/status/([^/]+) { # proxy_pass http://phoenix/notice/$1; # } -- cgit v1.2.3 From 3da1b2548dd5793fcf08050470252b9574991295 Mon Sep 17 00:00:00 2001 From: Sean King Date: Mon, 18 Jul 2022 21:30:57 -0600 Subject: Actually fix with forward slashes being restricted inside nickname --- installation/pleroma.nginx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'installation/pleroma.nginx') diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index d53852984..273cfb390 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -82,15 +82,15 @@ server { } # Uncomment this if you want notice compatibility routes for frontends like Soapbox. - # location ~ /@([^/]+)/([^/]+) { + # location ~ ^/@[^/]+/([^/]+)$ { # proxy_pass http://phoenix/notice/$1; # } # - # location ~ /@([^/]+)/posts/([^/]+) { + # location ~ ^/@[^/]+/posts/([^/]+)$ { # proxy_pass http://phoenix/notice/$1; # } # - # location ~ /([^/]+)/status/([^/]+) { + # location ~ ^/[^/]+/status/([^/]+)$ { # proxy_pass http://phoenix/notice/$1; # } -- cgit v1.2.3