I'm working on REST services at the moment and running into CORS problems.
To explained it, I took the example in vibe.d-0.8.4/examples/rest-js
This restserver runs using

I build a second (client) server running to consume the rest services.
For consuming I took the test.js from the rest server.

I got the message:
Access to XMLHttpRequest at '' from origin '' 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.

In a second step:
I gave the rest server additional code

setting restsettings.allowedOrigins = ["*"];

On the client side I added

xhr.setRequestHeader('Access-Control-Allow-Origin', '*'); before xhr.send();

Same CORS issue

Using the rest server on any browser (the direct way = same url, same port) works fine.
How to solve?

Thanks & Regards, Ozan