Uploading files via mod_http_upload

Hi! I got ejabberd 16.12 installed on Ubuntu from binary installer downloaded from https://www.process-one.net/ejabberd/downloads .
In context of web-client development im trying to implement uploading files to server via mod_http_upload.
I can successfully get upload slot ( described there http://xmpp.org/extensions/xep-0363.html ) but what should I do after to upload the file? When im trying to send the file via "fileupload" jquery plugin to put_url from quote response by PUT method im getting error like:

>XMLHttpRequest cannot load https://jabber.fokgroup.com:5443/upload/10e1288c4f3159a10d0559c346d3dae1.... Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

The same result im getting when trying to send file to base put_url (https://jabber.fokgroup.com:5443/upload).
Bun in config I set custom_headers which must fix this problem but they don't.
All the test are done from localhost to remote ejabberd server deployed in https://jabber.fokgroup.com/

Config of listened port and mod_http_upload is listed below:

mod_http_upload:
    docroot: "/opt/ejabberd-16.12/upload"
    put_url: "https://jabber.fokgroup.com:5443/upload"
    max_size: infinity
    access: local
    thumbnail: false
    custom_headers:
      "Access-Control-Allow-Origin": "*"
      "Access-Control-Allow-Methods": "GET, POST, PUT, OPTIONS"
-
    port: 5443
    module: ejabberd_http
    tls: true
    certfile: "/opt/ejabberd-16.12/conf/server.pem"
    request_handlers:
      "upload": mod_http_upload

Also url https://jabber.fokgroup.com:5443/upload returns "Not found.". That sounds strange cause its expected to see info page like it is done in http-bind.
Can someone describe what should I do to fix and complete file uploading process please?

Was there a response/answer

Was there a response/answer to this question? I'm also interested in the resolution.

Syndicate content