|
@@ -174,15 +174,11 @@ app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "MTWorkHR.AP
|
|
|
app.UseRouting(); // <-- Add UseRouting() here
|
|
|
|
|
|
app.UseCors(x => x
|
|
|
- .WithOrigins("https://api.mtwork.com", "https://mtworkhrclient.azurewebsites.net", "http://localhost:4200/") // Allowed origin
|
|
|
+ .WithOrigins("https://api.mtwork.com", "https://mtworkhrclient.azurewebsites.net", "http://localhost:4200", "https://www.mtwork.com") // Allowed origins without trailing slash
|
|
|
.AllowAnyMethod()
|
|
|
.AllowAnyHeader()
|
|
|
- .SetIsOriginAllowed(origin =>
|
|
|
- true) // allow any origin
|
|
|
- .AllowCredentials()); // allow credentials
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ .AllowCredentials() // Allows credentials
|
|
|
+);
|
|
|
|
|
|
|
|
|
|