Commit 38391d0c authored by Almouhannad's avatar Almouhannad

(B) Fix CORS to satisfy SignalR

parent 2c045179
...@@ -142,12 +142,16 @@ if (app.Environment.IsDevelopment()) ...@@ -142,12 +142,16 @@ if (app.Environment.IsDevelopment())
app.UseHttpsRedirection(); app.UseHttpsRedirection();
#region Map notification HUB #region Map notification HUB
app.MapHub<NotificationHub>("notifications"); app.MapHub<NotificationHub>("api/Notifications");
#endregion #endregion
#region CORS #region CORS
// TODO: Configure allows // TODO: Configure allows
app.UseCors(policy => policy.AllowAnyHeader().AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin()); app.UseCors(policy =>
policy
.AllowAnyHeader().AllowAnyMethod().AllowAnyHeader()
.AllowCredentials().SetIsOriginAllowed(origin => true));
#endregion #endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment