using DocumentServiceAPI.Core;
|
using Furion;
|
|
namespace DocumentServiceAPI.Web.Entry
|
{
|
|
|
public class DocServiceApiStartup: AppStartup
|
{
|
public void ConfigureServices(IServiceCollection services)
|
{
|
services.AddSqlsugarSetup();
|
}
|
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
{
|
|
|
app.DbCodeFirst("DocumentServiceAPI.Model");
|
app.UseStaticFiles(new StaticFileOptions
|
{
|
OnPrepareResponse = (stf) =>
|
{
|
stf.Context.Response.Headers["Access-Control-Allow-Origin"] = "*";
|
stf.Context.Response.Headers["Access-Control-Allow-Headers"] = "*";
|
}
|
});
|
}
|
}
|
}
|