Forum - Getting around the “Same Origin Policy” browser restriction to use Aleph REST API

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #33929

    Hi Aleph People

    Have any of you encountered the problem of trying to make an AJAX call to the Aleph API but you are blocked by be the Same Origin Policy of the browser?

    We have our Aleph API running on an alternate port and it answers calls well and delivers XML responses as expected. But the browser can’t retrieve them.

    We would like to work around this restriction by implementing CORS (Cross-Origin Resource Sharing) but how can we configure the JBOSS web server to include the proper HTTP header?

    Enabling CORS on various web servers
    Same Origin Policy
    example Header we want to add: Access-Control-Allow-Origin



    We were not able to enable CORS. We have come up with an alternative method of using the Aleph API which involves using PHP to make the API call rather than making the API call directly from the browser with Javascript.


    A bit late but … have you tried in javascript: fetch(url, {mode: ‘no-cors’})?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.