[
https://issues.apache.org/jira/browse/CALCITE-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Josh Elser updated CALCITE-1082:
--------------------------------
Summary: CORS Support for Avatica Requests (was: CORS Support for Avatica
Requests on Phoenix Query Server)
> CORS Support for Avatica Requests
> ---------------------------------
>
> Key: CALCITE-1082
> URL: https://issues.apache.org/jira/browse/CALCITE-1082
> Project: Calcite
> Issue Type: New Feature
> Reporter: Steve T
> Priority: Minor
>
> It would be super cool if I could write Javascript in a web page to
> read/write my Phoenix tables. I spend the last few days learning about CORS
> and browser security. I found out that what I am trying to accomplish cannot
> be readily done because the browser adds CORS headers (like
> {color:blue}{{Origin: <whatever>}}{color}) and methods (like
> {color:blue}{{method: OPTIONS}}{color}) that are not supported by Phoenix
> Query Server.
> I do not know if this can be added on the Phoenix side or if it has to be
> added on the Avatica side, but for the time being I am trying the following
> to make it work:
> 1. Unconventional Javascript to remove the
> {color:blue}{{X-Requested-With}}{color} header in the request.
> 2. One line code change in Avatica's
> {color:blue}{{AvaticaJsonHandler.handle()}}{color} to add an
> {color:blue}{{Access-Control-Allow-Origin: *}}{color} header to the response.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)