diff --git a/.env.sample b/.env.sample index 27c6e5d..f89c403 100644 --- a/.env.sample +++ b/.env.sample @@ -167,3 +167,6 @@ RETENTION_MAX_LIFETIME=4w #COMPOSE_FILE="$COMPOSE_FILE:compose.shared_secret_auth.yml" #SHARED_SECRET_AUTH_ENABLED=1 #SECRET_SHARED_SECRET_AUTH_VERSION=v1 # length=128 + +## Web Client (Redirect) +#WEB_CLIENT_LOCATION=https://element-web.example.com diff --git a/abra.sh b/abra.sh index 36ac573..2f93277 100644 --- a/abra.sh +++ b/abra.sh @@ -1,11 +1,11 @@ export DISCORD_BRIDGE_YAML_VERSION=v2 export ENTRYPOINT_CONF_VERSION=v2 -export HOMESERVER_YAML_VERSION=v28 +export HOMESERVER_YAML_VERSION=v29 export LOG_CONFIG_VERSION=v2 export SHARED_SECRET_AUTH_VERSION=v1 export SIGNAL_BRIDGE_YAML_VERSION=v4 export TELEGRAM_BRIDGE_YAML_VERSION=v6 -export NGINX_CONFIG_VERSION=v6 +export NGINX_CONFIG_VERSION=v7 export WK_SERVER_VERSION=v1 export WK_CLIENT_VERSION=v1 diff --git a/compose.yml b/compose.yml index 6f36a1e..93e2dcb 100644 --- a/compose.yml +++ b/compose.yml @@ -75,6 +75,7 @@ services: - LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5} - LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003} - LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5} + - WEB_CLIENT_LOCATION networks: - internal entrypoint: /docker-entrypoint.sh diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index 350f954..1d5427a 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -276,3 +276,6 @@ rc_login: account: per_second: {{ env "LOGIN_LIMIT_ACCOUNT_PER_SECOND" }} burst_count: {{ env "LOGIN_LIMIT_ACCOUNT_BURST" }} + +# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#web_client_location +web_client_location: {{ env "WEB_CLIENT_LOCATION" }} diff --git a/nginx.conf.tmpl b/nginx.conf.tmpl index 244eb83..64fea22 100644 --- a/nginx.conf.tmpl +++ b/nginx.conf.tmpl @@ -13,6 +13,15 @@ http { server_name {{ env "DOMAIN" }}; + location = / { + proxy_pass http://{{ env "STACK_NAME"}}_app:8008; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Host $host; + client_max_body_size 50M; + proxy_http_version 1.1; + } + location ~* ^(\/_matrix|\/_synapse\/client) { proxy_pass http://{{ env "STACK_NAME"}}_app:8008; proxy_set_header X-Forwarded-For $remote_addr;