lemmy: restrict the http_accept types i forward to the backend
it seems that forwarding `POST`s is the important part i was missing earlier
This commit is contained in:
parent
04e8e72ae3
commit
6ff2c8acae
|
@ -69,17 +69,17 @@ in {
|
||||||
proxyPass = "$proxpass";
|
proxyPass = "$proxpass";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set $proxpass "${ui}";
|
set $proxpass "${ui}";
|
||||||
# if ($http_accept = "application/activity+json") {
|
if ($http_accept = "application/activity+json") {
|
||||||
# set $proxpass "${backend}";
|
|
||||||
# }
|
|
||||||
# if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
|
|
||||||
# set $proxpass "${backend}";
|
|
||||||
# }
|
|
||||||
|
|
||||||
# XXX: lemmy-ansible nginx uses this maximally broad redirection
|
|
||||||
if ($http_accept ~ "^application/.*$") {
|
|
||||||
set $proxpass "${backend}";
|
set $proxpass "${backend}";
|
||||||
}
|
}
|
||||||
|
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
|
||||||
|
set $proxpass "${backend}";
|
||||||
|
}
|
||||||
|
|
||||||
|
# XXX: lemmy-ansible nginx uses this maximally broad redirection
|
||||||
|
# if ($http_accept ~ "^application/.*$") {
|
||||||
|
# set $proxpass "${backend}";
|
||||||
|
# }
|
||||||
# XXX: POST redirection occurs in lemmy-ansible and docker/nginx.conf but not docker/federation/nginx.conf
|
# XXX: POST redirection occurs in lemmy-ansible and docker/nginx.conf but not docker/federation/nginx.conf
|
||||||
if ($request_method = POST) {
|
if ($request_method = POST) {
|
||||||
set $proxpass "${backend}";
|
set $proxpass "${backend}";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user