Hello community,
while doing an ajax request to kick a user from a MUC room, using the REST API plugin, I get the following error:
Access to XMLHttpRequest at ‘http://www.rmas.cl:9090/plugins/restapi/v1/chatrooms/global/members/jack’ from origin ‘http://www.rmas.cl’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
CORS support is enabled on Openfire, and I have added an Access-Control-Allow-Origin “*” header in the apache config file. The header shows up in any response, except when I call the REST API:
- Allow: OPTIONS,DELETE,POST
- Content-Encoding: gzip
- Content-Length: 468
- Content-Type: application/vnd.sun.wadl+xml
- Date: Mon, 15 Apr 2019 19:51:06 GMT
- Last-Modified: Wed, 10 Apr 2019 10:43:49 CLST
- Vary: Accept-Encoding
- X-Frame-Options: same
I’m using Openfire 4.3.2 with REST API 1.3.9.
Any help on this issue is much appreciated!