Open berezovskyi opened 2 years ago
When dealing with UI preview, browser sends CORS requests, it looks like this:
The first request MUST succeed and return CORS headers. Only if that is done, the browser will send the actual response.
OAuth support in Lyo always sends 401 to the CORS preflight requests. Here is the fix: https://github.com/oslc-op/refimpl/commit/35007419f7b0c96f46bed981fe3c52816f99b003
We should also fix the duplication in the code between the snippet above and https://github.com/oslc-op/refimpl/blob/master/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/OslcCorsFilter.java but I don't think we are generating that yet.
When dealing with UI preview, browser sends CORS requests, it looks like this:
The first request MUST succeed and return CORS headers. Only if that is done, the browser will send the actual response.
OAuth support in Lyo always sends 401 to the CORS preflight requests. Here is the fix: https://github.com/oslc-op/refimpl/commit/35007419f7b0c96f46bed981fe3c52816f99b003
We should also fix the duplication in the code between the snippet above and https://github.com/oslc-op/refimpl/blob/master/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/OslcCorsFilter.java but I don't think we are generating that yet.