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

Add support multi-domain CORS #239

Open
petermasking opened this issue Apr 12, 2023 · 0 comments
Open

Add support multi-domain CORS #239

petermasking opened this issue Apr 12, 2023 · 0 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@petermasking
Copy link
Member

Our current CORS middleware implementation supports a single domain only. The next step is to add support for multiple domains.

For the implementation we need to add the domain of the request to the middleware, and update the CORS implementation to accept a list of origins:

startServer(moduleImporter).then(server =>
{
    server.addMiddleware(new CorsMiddleware('domain1, domain2, ...'));
});

The CORS implementation can then simply check if the request domain is in the list of origins and set the headers accordingly.

@petermasking petermasking added feature New feature or request server labels Apr 12, 2023
@basmasking basmasking self-assigned this Jun 2, 2024
@basmasking basmasking removed the server label Oct 11, 2024
@basmasking basmasking added this to the Middleware milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants