Handle long activitystreams header in nginx config (ref #1322)

pull/1332/head
Felix Ableitner 2020-12-16 18:24:14 +01:00
parent 036161cb38
commit db0a51de2a
2 changed files with 18 additions and 0 deletions

View File

@ -61,6 +61,9 @@ server {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass "http://0.0.0.0:{{ lemmy_port }}"; 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) { if ($request_method = POST) {
set $proxpass "http://0.0.0.0:{{ lemmy_port }}"; set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
} }

View File

@ -28,6 +28,9 @@ http {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass http://lemmy-alpha; 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_pass $proxpass;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@ -70,6 +73,9 @@ http {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass http://lemmy-beta; 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_pass $proxpass;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@ -112,6 +118,9 @@ http {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass http://lemmy-gamma; 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_pass $proxpass;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@ -154,6 +163,9 @@ http {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass http://lemmy-delta; 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_pass $proxpass;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@ -196,6 +208,9 @@ http {
if ($http_accept = "application/activity+json") { if ($http_accept = "application/activity+json") {
set $proxpass http://lemmy-epsilon; 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_pass $proxpass;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;