WebSphere Liberty CORS Feature Problems -


i trying use new cors feature in websphere liberty profile 8.5.5.9. think have set correctly, not working @ all, it's possible got configuration wrong. there nothing in log 1 way or other - no errors or informational messages.

is there kind of trace turn on show me cors feature , possibly why it's not working?

here our config:

<cors domain="/talentplaybookservice/rest" allowedorigins="https://w3dev.somerslab.ibm.com/"     allowedmethods="get, head, post, put"     allowedheaders="referer, cache-control, pragma, accept, accept-language, accept-encoding, accept-charset, content-type, content-length, user-agent, authorization, passwd, x-update-nonce, x-shindig-st, x-ic-cre-request-origin, x-ic-cre-user, x-lconn-auth, accept*, content*"     exposeheaders="content-type, last-modified, etag"      allowcredentials="true" maxage="3600" /> 

the following trace setting activate cors logging:

<logging tracespecification="corsservice=finest"/> 

you should see "handlerequest" method invocation corsrequestinterceptor.

edit: if see trace "iscorssupportenabled" coming true, means cors configuration being picked up. however, if not see trace entry "logcorsrequestinfo" means client invocation did not specify required header called "origin".

i suggest f12 on browser see if outgoing headers/origin, etc, expected. specifically, if "origin" header being passed client.

edit #2 liberty's cors interceptor @ filter-level, think of filter applies domains (apps) configure cors element in server.xml. means current cors support won't handle requests not reach filter layer, such 401 mentioned in other answer. known limitation being taken consideration future requirements.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -