The built-in REST API endpoints don't seem to support any mechanism for adding 
arbitrary response headers. However you should be able to add your own headers 
when writing a REST extension: 
https://docs.marklogic.com/guide/rest-dev/extensions

For the built-in endpoints you might consider routing requests through another 
app-server layer, or a transparent reverse proxy. Either way the goal would be 
to re-route requests so that the browser thinks both REST API instances are on 
the same server.

-- Mike

On 23 Jun 2014, at 02:17 , Krishna Chaitanya A <[email protected]> 
wrote:

> Hello all,
> 
> I am Krishna, a computer science MSc student at TU Delft in the Netherlands. 
> I am using MarkLogic's inbuilt REST APIs to access two document stores. My 
> web application is hosted in the modules database of one of these stores. 
> When I try accessing the second database from my application, I get the 'No 
> Access-Control-Allow-Origin' error in my browser. I have read the 
> documentation regarding xdmp:add-response-header at 
> 
> https://docs.marklogic.com/xdmp%3aadd-response-header
> 
> However, I have not been able to figure out where I can use this to enable 
> CORS. Any help on this would be great!
> 
> Thanks in advance.
> 
> Regards,
> Krishna
> 
> 
> 
> ----
> Krishna Chaitanya Akundi
> MSc Student, Web Information Systems
> EEMCS - TU Delft
> The Netherlands
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to