Thursday, 15 April 2010

MarkLogic - CORS with REST API -



MarkLogic - CORS with REST API -

i have marklogic-based web application pulls info 2 sources, document store , triple store both hosted on marklogic server. app uses marklogic's built-in rest apis access these info stores. document store's rest api running on port 8003 , triple store's rest api on port 8007. application hosted on modules database of document store. now, when create rest api phone call pull triple data, exception saying 'access-control-allow-origin' header has not been set @ server side. know how can set 'access-control-allow-origin' '*' in responses rest api. have read documentation on xdmp:add-response-headers, i'm not able figure out can utilize correctly. help much appreciated!

thanks!

why not maintain documents , triples in same database? ability 1 of marklogic's strengths.

the built-in rest api endpoints don't seem back upwards mechanism adding arbitrary response headers. should able add together own headers when writing rest extension: https://docs.marklogic.com/guide/rest-dev/extensions

for built-in endpoints might consider routing requests through app-server layer, or transparent reverse proxy. either way goal re-route requests browser thinks both rest api instances on same server.

api rest semantic-web marklogic

No comments:

Post a Comment