wundergraph / cosmo

The open-source solution to building, maintaining, and collaborating on GraphQL Federation at Scale. The alternative to Apollo Studio and GraphOS.
https://cosmo-docs.wundergraph.com/
Apache License 2.0
742 stars 105 forks source link

feat(router): allow users to have multiple wildcards cores allow_origins #1358

Closed df-wg closed 1 week ago

df-wg commented 1 week ago

Motivation and Context

A previous effort, #880, gave the initial steps to enabling multiple wildcards in cors.allow_origins. This PR takes it further, ensuring that we can handle a config with the configuration:

name: "CORS_ALLOW_ORIGINS"
value: "https://*.example.com,https://example.com,https://*.example.io:*,https://*.example.org,https://*.mytest.amplifyapp.com"

Closes #879

Checklist

df-wg commented 1 week ago

Bench with wildcard: Screenshot 2024-11-11 at 7 42 56 PM

Bench without wildcard: Screenshot 2024-11-11 at 7 43 44 PM