app/matrix: forward IP to synapse
diff --git a/app/matrix/homeserver.yaml.j2 b/app/matrix/homeserver.yaml.j2
index eb09345..75ac5aa 100644
--- a/app/matrix/homeserver.yaml.j2
+++ b/app/matrix/homeserver.yaml.j2
@@ -32,7 +32,7 @@
bind_addresses: ['::']
type: http
tls: true
- x_forwarded: false
+ x_forwarded: true
resources:
- names: [client]
compress: true
@@ -44,7 +44,7 @@
tls: false
bind_addresses: ['::']
type: http
- x_forwarded: false
+ x_forwarded: true
resources:
- names: [client]
diff --git a/app/matrix/prod.jsonnet b/app/matrix/prod.jsonnet
index cabcc81..62ed291 100644
--- a/app/matrix/prod.jsonnet
+++ b/app/matrix/prod.jsonnet
@@ -2,8 +2,10 @@
# This needs a secret provisioned, create with:
# kubectl -n matrix create secret generic synapse --from-literal=postgres_password=$(pwgen 24 1)
# kubectl -n matrix create secret generic oauth2-cas-proxy --from-literal=oauth2_secret=...
-# kubectl -n matrix create secret generic appservice-irc-freenode-registration --from-file=registration.yaml=<(kubectl logs -n matrix $(kubectl get pods -n matrix --selector=job-name=appservice-irc-freenode-bootstrap --output=jsonpath='{.items[*].metadata.name}') | tail -n +4)
+# kubectl -n matrix create secret generic appservice-irc-freenode-registration --from-file=registration.yaml=<(kubectl logs -n matrix $(kubectl get pods -n matrix --selector=job-name=appservice-irc-freenode-bootstrap --output=jsonpath='{.items[*].metadata.name}') | tail -n +4 | sed -r 's/(.*aliases:.*)/ group_id: "+freenode:hackerspace.pl"\n\1/')
+#
# TODO: /appservices/*/registration.yaml needs to be copied into /data/appservices/*.yaml manually
+# kubectl exec -n matrix synapse-7b69cd5b6c-6686j -- sh -c 'mkdir /data/appservices ; cp /appservices/irc-freenode/registration.yaml /data/appservices/freenode-irc.yaml'
local kube = import "../../kube/kube.libsonnet";
local postgres = import "../../kube/postgres.libsonnet";