We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 587e051 commit dd66baeCopy full SHA for dd66bae
1 file changed
MyApp/Configure.Cors.cs
@@ -19,5 +19,15 @@ public void Configure(IWebHostBuilder builder) => builder
19
.SetPreflightMaxAge(TimeSpan.FromHours(1));
20
});
21
22
+ services.AddTransient<IStartupFilter, StartupFilter>();
23
24
+
25
+ public class StartupFilter : IStartupFilter
26
+ {
27
+ public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next) => app =>
28
29
+ app.UseCors();
30
+ next(app);
31
+ };
32
+ }
33
}
0 commit comments