Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions DevProxy/Extensions/IServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ public static IServiceCollection ConfigureDevProxyServices(
DevProxyConfigOptions options)
{
_ = services.AddControllers();
_ = services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
_ = builder
.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
});
});
Comment thread
waldekmastykarz marked this conversation as resolved.
_ = services
.AddApplicationServices(configuration, options)
.AddHostedService<ProxyEngine>()
Expand Down
1 change: 1 addition & 0 deletions DevProxy/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ static WebApplication BuildApplication(DevProxyConfigOptions options)

var app = builder.Build();

_ = app.UseCors();
_ = app.UseSwagger();
_ = app.UseSwaggerUI();
_ = app.MapControllers();
Expand Down
Loading