Api.dreamhost.com, AJAX, and CORS


I am trying to use the DreamHost API via AJAX on a website, much like the question posted here:

Does the Dreamhost API work with AJAX

In the discussion on that page, the response from Andrew_F was:

“using the DreamHost API in a web page would mean that your API key is embedded in that page”

That seems like a perfectly reasonable response. However, in my particular case, my plan was to use local storage for the API key, rather than hard-coding it into the website.

I have a mock-up that I created as a starting point, which you can access here, but the mock-up doesn’t work because api.dreamhost.com doesn’t reply with the necessary “Access-Control-Allow-Origin” header.

Is there any possibility of revisiting this question, and perhaps updating the DreamHost API to support the Access-Control-Allow-Origin header?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.