kyy
7 天以前 6a00bae1d56005b2ff2216620a011875d862fbd9
WebApi/Gs.HostIIS/Program.cs
@@ -28,8 +28,8 @@
    options.AddPolicy("AllowAll", builder =>
    {
        builder.AllowAnyOrigin()
            .AllowAnyMethod()
            .AllowAnyHeader();
               .AllowAnyMethod()
               .AllowAnyHeader();
    });
});
builder.Services.AddCustomConvention();
@@ -73,8 +73,7 @@
    //添加安全定义
    c.AddSecurityDefinition("Token", new OpenApiSecurityScheme
    {
        Description =
            "请输入token,格式为:token 3fa85f64-5717-4562-b3fc-2c963f66afa6(注意中间必须有空格)",
        Description ="请输入token,格式为:token 3fa85f64-5717-4562-b3fc-2c963f66afa6(注意中间必须有空格)",
        Name = "token",
        In = ParameterLocation.Header,
        Type = SecuritySchemeType.ApiKey,
@@ -111,7 +110,7 @@
});
//添加上传路径
var _upPath = AppContext.BaseDirectory +
              AppSettingsHelper.getValueByKey("UploadPath");
                AppSettingsHelper.getValueByKey("UploadPath");
app.UseStaticFiles(new StaticFileOptions
{
    FileProvider = new PhysicalFileProvider(_upPath),