Krishna Chaitanya Krishna Chaitanya - 1 year ago 255
Ajax Question

MarkLogic HTTP Server: Set up CORS headers

I am running

MarkLogic 7
on a
CentOS 6.5 box
. I have my
application hosted on a MarkLogic HTTP server on the same machine. The application runs on port 8003, and needs to access data through a
running on a different port 8007. When I use an
request in my application, I get an error saying

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

Has anyone set up
earlier? Any help would be great.

Answer Source

You can use to set the Access-Control-Allow-Origin header. You'll have to do that for every endpoint that needs to use cross-site requests: has details.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download