Browse Source

Remove cors from the signalr service

- The frontend hits the gateway which does the preflight request
davidfowl/common-services
David Fowler 1 year ago
committed by Reuben Bond
parent
commit
84c6b11c69
1 changed files with 0 additions and 14 deletions
  1. +0
    -14
      src/Services/Ordering/Ordering.SignalrHub/Program.cs

+ 0
- 14
src/Services/Ordering/Ordering.SignalrHub/Program.cs View File

@ -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…
Cancel
Save