diff --git a/docs/topics/cors.rst b/docs/topics/cors.rst index af2ef94aea..7e69318394 100644 --- a/docs/topics/cors.rst +++ b/docs/topics/cors.rst @@ -33,12 +33,11 @@ This would be configured as a singleton in DI, and hard-coded with its ``Allowed For example, in ``ConfigureServices``:: services.AddSingleton((container) => { - { var logger = container.GetRequiredService>(); return new DefaultCorsPolicyService(logger) { AllowedOrigins = { "https://foo", "https://bar" } }; - }; + }); .. Note:: Use ``AllowAll`` with caution.