qwj
2023-08-02 361e8babc2e2b25eab34d8031ea3b58846498bac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"] = "*";
                }
            });
        }
    }
}