File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ public static IServiceCollection ConfigureDevProxyServices(
2121 DevProxyConfigOptions options )
2222 {
2323 _ = services . AddControllers ( ) ;
24+ _ = services . AddCors ( options =>
25+ {
26+ options . AddDefaultPolicy ( builder =>
27+ {
28+ _ = builder
29+ . AllowAnyOrigin ( )
30+ . AllowAnyMethod ( )
31+ . AllowAnyHeader ( ) ;
32+ } ) ;
33+ } ) ;
2434 _ = services
2535 . AddApplicationServices ( configuration , options )
2636 . AddHostedService < ProxyEngine > ( )
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ static WebApplication BuildApplication(DevProxyConfigOptions options)
3232
3333 var app = builder . Build ( ) ;
3434
35+ _ = app . UseCors ( ) ;
3536 _ = app . UseSwagger ( ) ;
3637 _ = app . UseSwaggerUI ( ) ;
3738 _ = app . MapControllers ( ) ;
You can’t perform that action at this time.
0 commit comments