Update nginx-vhost-config.sh for register

This commit is contained in:
kjg 2021-07-17 19:43:13 +02:00
parent 2eae292780
commit 426ae00478

View file

@ -65,6 +65,12 @@ client_endpoints=$(tr -d '\n' << EOF
EOF EOF
) )
register_endpoints=$(tr -d '\n' << EOF
(^/_matrix/client/(api/v1|r0|unstable)/login$
|^/_matrix/client/(r0|unstable)/register$)
EOF
)
cat << EOF cat << EOF
# Deny access to root. # Deny access to root.
deny all; deny all;
@ -136,4 +142,12 @@ if [ -n "$CLIENT_WORKERS" ]; then
EOF EOF
fi fi
if [ -n "$REGISTER_WORKERS" ]; then
cat << EOF
location ~ $register_endpoints {
proxy_pass http://register_workers;
}
EOF
fi
echo "}" echo "}"