新增:管理后台前端页面,以及openspec内容。
This commit is contained in:
@@ -10,7 +10,17 @@ builder.Services.AddControllersWithViews();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>HttpClientFactory
|
||||
builder.Services.AddHttpClient();
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy(name: "KuaYu",
|
||||
policy =>
|
||||
{
|
||||
policy
|
||||
.AllowAnyOrigin()
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
|
||||
builder.Services.AddScoped<MySqlConnection>(sp => {
|
||||
var connectionString = builder.Configuration.GetConnectionString("MySQLConnection");
|
||||
@@ -68,7 +78,7 @@ if (!app.Environment.IsDevelopment())
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseCors("KuaYu");
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
Reference in New Issue
Block a user