Remove cors from the signalr service
- The frontend hits the gateway which does the preflight request
This commit is contained in:
parent
561d48bc62
commit
84c6b11c69
@ -2,16 +2,6 @@
|
||||
|
||||
builder.AddServiceDefaults();
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("CorsPolicy",
|
||||
builder => builder
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.SetIsOriginAllowed((host) => true)
|
||||
.AllowCredentials());
|
||||
});
|
||||
|
||||
builder.Services.AddSignalR(builder.Configuration);
|
||||
|
||||
builder.Services.AddSingleton<IIntegrationEventHandler<OrderStatusChangedToAwaitingValidationIntegrationEvent>, OrderStatusChangedToAwaitingValidationIntegrationEventHandler>();
|
||||
@ -25,10 +15,6 @@ var app = builder.Build();
|
||||
|
||||
app.UseServiceDefaults();
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapHub<NotificationsHub>("/hub/notificationhub");
|
||||
|
||||
var eventBus = app.Services.GetRequiredService<IEventBus>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user