1

I am trying to send POST requests to Livy in javascript from my website using fetch (). However, CORS is enabled by default and the request fails. On setting the mode to 'no-cors', the livy server sends an empty string as a response ( I cannot access the response ). Is there a way to modify the livy.conf file or any other way to enable CORS in the livy server ?

Any help would be appreciated.

1 Answers1

1

I scanned the Livy server source code and CORS is not configurable currently (as of 0.5-incubating or below) because there are no routes for HTTP OPTIONS requests (the pre-flight request in CORS).

I opened a ticket to the Livy team about it here: https://issues.apache.org/jira/browse/LIVY-444

Hopefully we can get some closure on this soon.

Zach King
  • 798
  • 1
  • 8
  • 21
  • It's also worth mentioning that you can use a temporary workaround of enabling fake CORS through the browser (e.g. the CORS Everywhere add-on for Firefox: https://addons.mozilla.org/en-US/firefox/addon/cors-everywhere/) – Zach King Mar 03 '18 at 00:35