-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Extract CORS to a standalone extension #6309
Comments
Let's keep |
Let's start by discussing the user (app developer) experience. Here is my point of view: As a LoopBack user building a new API server, I want to quickly scaffold a LoopBack project with the recommended settings and best practices in place. I want a reasonable CORS setup that will allow my API to be consumed by a variety of clients, including single-page web applications (HTML5 SPAs - React, Angular, Vue). We should keep this in mind when discussing what changes to make. For example, if we remove all CORS-related code from
I'd like us to consider impact of such breaking change on our users. It may be better to make these changes in phases, e.g.:
See Reacting versioning guidelines for inspiration: https://reactjs.org/docs/faq-versioning.html#breaking-changes |
From the other thread, +1 for changing to safer CORS defaults. However, CORS tends to be an important part of a REST API. So I'm not too sure if we should abstract it from Since CORS is already managed by |
As long as there is an intuitive way to enable-disable it, and it is disabled by default (can be enabled in scaffolded apps) I am fine with it being in |
IMO, I'm leaning to leaving CORS in |
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
CORS should not be baked in into the framework, especially with defaults. Configuring CORS is a error-prone, complicated task, we should let users take 100% responsibility of setting it up themselves; and disabling CORS should simply mean "not using the CORS extension".
Acceptance criteria
The text was updated successfully, but these errors were encountered: