[teiid-issues] [JBoss JIRA] (TEIID-4366) Provide CORS support on OData Service

Juraj Duráni (JIRA) issues at jboss.org
Thu Oct 20 09:24:00 EDT 2016


     [ https://issues.jboss.org/browse/TEIID-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juraj Duráni reopened TEIID-4366:
---------------------------------


 Teiid returns _TEIID16056_ even for requests with "Origin" header.

{code:java|title=Sample code}
String origin = "http://localhost";
HttpURLConnection con = (HttpURLConnection) new URL("http://localhost:8080/odata4/my_vdb/views/v1").openConnection();
con.setRequestProperty("Authorization", "Basic " + Base64.encodeBase64String("user:user".getBytes()));
con.setRequestProperty("Origin", origin);
con.setRequestMethod("OPTIONS");
con.connect();
try{
    int code = con.getResponseCode();
    Assert.assertEquals(code, HttpStatus.SC_NO_CONTENT, "Response code.");
    ...
} finally {
    con.disconnect();
}
{code}

{code:plain|title=Test result}
java.lang.AssertionError: Response code. expected [204] but found [400]
{code}

> Provide CORS support on OData Service
> -------------------------------------
>
>                 Key: TEIID-4366
>                 URL: https://issues.jboss.org/browse/TEIID-4366
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: OData
>    Affects Versions: 8.12
>            Reporter: Ramesh Reddy
>            Assignee: Ramesh Reddy
>              Labels: Alpha3
>             Fix For: 9.1, 9.0.4, 8.12.7.6_3
>
>
> Good write up CORS can be found here https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
> OData needs to implement CORS support to be valuable with java script based client development technologies.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the teiid-issues mailing list