Almost finish implementing client side
This commit is contained in:
@@ -63,7 +63,8 @@ public class Program
|
||||
BearerFormat = "jwt"
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
builder.Services.AddCors();
|
||||
|
||||
builder.Services.AddIdentity<User, IdentityRole>()
|
||||
.AddEntityFrameworkStores<ImgBoardContext>()
|
||||
@@ -143,6 +144,13 @@ public class Program
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseCors(x => x
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.SetIsOriginAllowed(origin => true) // allow any origin
|
||||
//.WithOrigins("https://localhost:44351")); // Allow only this origin can also have multiple origins separated with comma
|
||||
.AllowCredentials()); // allow credentials
|
||||
|
||||
app.MapControllers();
|
||||
app.Run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user