Support Questions
Find answers, ask questions, and share your expertise

Allowing CORS on HBase REST API

Rising Star

I am currently creating a simple HTML page to read data from the HBase REST API. I can successfully get data from the REST API using curl so I know the REST API is working. However when I try to get this data from JavaScript, I get the following error: "No 'Access-Control-Allow-Origin' header is present on the requested resource."

I understand that this is due to the fact that browsers typically implement a same origin policy. I can bypass this by setting up the server for CORS. However I can find no guidance online about how to achieve this with the HBase rest server.

Could somebody please provide with me guidance on how to set up CORS on the HBase REST server.


Re: Allowing CORS on HBase REST API

@Mark Heydenrych

I believe the current version of Hbase doesn't have jetty which has cross-origin resource sharing, you can follow below Jira for more info.

Re: Allowing CORS on HBase REST API

Super Collaborator

Considering the package namespace change, HBASE-12894 wouldn't come into hbase 1.x release.

For 2.0, the release date is unknown.

Re: Allowing CORS on HBase REST API

To work-around this you could configure your web service to proxy the HBase requests.

For example, in Apache HTTP:


ProxyPass /hbase/ http://localhost:8081/
ProxyPassReverse /hbase/ https://localhost:8081/

Re: Allowing CORS on HBase REST API

New Contributor

Hi Mark.. I got in to similar issue(

Allowing CORS on HBase REST API

)... do you have some fix for this..Please help me....