Browse Source

added sample config for ejabberd xep-0156

dominik 1 year ago
parent
commit
f59d2621ba
2 changed files with 19 additions and 0 deletions
  1. 6 0
      README.md
  2. 13 0
      data/ejabberd-vhost

+ 6 - 0
README.md

@@ -39,6 +39,12 @@ To activate the configuration for  [mailcow](https://mailcow.email/):
   - `cd` in `./data/conf.d/` and 
   - create a hardlink `ln ../mailcow_proxy.conf mailcow_proxy.conf`
 
+#### ejabberd
+To set proper headers for ejabberd:
+  - `cd` in `./data/vhost.d/` and
+  - create a hardlink `ln ../ejabberd-vhost im.example.com` 
+
+
 #### Basic Auth
 `echo "someusername:"`echo "somepassword" openssl passwd -stdin` > ./data/htpasswd/www.example.com`
 to [enable basic auth for a vhost](https://github.com/jwilder/nginx-proxy#basic-authentication-support)

+ 13 - 0
data/ejabberd-vhost

@@ -0,0 +1,13 @@
+location =  /.well-known/host-meta {
+  proxy_pass        http://ejabberd:80;
+  proxy_hide_header content-type;
+  add_header        content-type 'application/xrd+xml' always;
+  add_header        Access-Control-Allow-Origin '*' always;
+}
+
+location = /.well-known/host-meta.json {
+  proxy_pass        http://ejabberd:80;
+  proxy_hide_header content-type;
+  add_header        content-type 'application/jrd+json' always;
+  add_header        Access-Control-Allow-Origin '*' always;
+}