Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth blocks CORS preflight requests #214

Open
berezovskyi opened this issue Dec 25, 2021 · 0 comments
Open

OAuth blocks CORS preflight requests #214

berezovskyi opened this issue Dec 25, 2021 · 0 comments
Assignees

Comments

@berezovskyi
Copy link
Member

When dealing with UI preview, browser sends CORS requests, it looks like this:

  • OPTIONS
  • GET/POST/...

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: oslc-op/refimpl@3500741

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants