hi
i use movim
i have movim run on another domain than my ejabberd server
when i try to upload a file or picture in movim, i get an cors error in chrome console:
XMLHttpRequest cannot load
in my ejabberd.yml i have:
port: 5443
module: ejabberd_http
certfile: "/etc/ejabberd/cert/upload.myejabberdserverdomain.tld.pem"
tls: true
##access: server_users
access: all
request_handlers:
"": mod_http_upload
mod_http_upload:
mod_http_upload:
docroot: "/var/www/vhosts/myejabberdserverdomain.tld/uploads/"
##host: "upload.%HOST%"
put_url: "https://upload.@HOST@:5443"
custom_headers:
"Access-Control-Allow-Origin": "*"
"Access-Control-Allow-Methods": "GET, POST, PUT, OPTIONS"
but this won't work
uploads from other clients work (gajim, conversation, monal,...), so http_upload works in general.
any ideas how to fix my cors problem?
greetings
rob
I had the same issue. I added
I had the same issue. I added to my config:
custom_headers:
"Access-Control-Allow-Origin": "*"
"Access-Control-Allow-Methods": "GET, POST, PUT, OPTIONS, DELETE"
"Access-Control-Allow-Headers": "Content-Type, Origin, X-Requested-With"
and it worked!