make
This commit is contained in:
parent
c063f39f4d
commit
9709cc44f4
|
|
@ -1,20 +1,28 @@
|
|||
using AspNetCoreRateLimit;
|
||||
|
||||
using Infrastructure;
|
||||
using Infrastructure.Converter;
|
||||
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
|
||||
using NLog.Web;
|
||||
|
||||
using SKIT.FlurlHttpClient.Wechat.Api;
|
||||
|
||||
using SqlSugar;
|
||||
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Common.Cache;
|
||||
using ZR.Common.DynamicApiSimple.Extens;
|
||||
using ZR.Infrastructure.WebExtensions;
|
||||
using ZR.Mall;
|
||||
using ZR.ServiceCore.Signalr;
|
||||
using ZR.ServiceCore.SqlSugar;
|
||||
using ZR.Mall;
|
||||
using SKIT.FlurlHttpClient.Wechat.Api;
|
||||
using Infrastructure;
|
||||
//using SQLitePCL;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
|
@ -156,8 +164,22 @@ app.Use((context, next) =>
|
|||
//}
|
||||
return next();
|
||||
});
|
||||
// 创建 MIME 类型映射器
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
|
||||
// 如果没有 .apk,就手动添加
|
||||
if (!provider.Mappings.ContainsKey(".apk"))
|
||||
{
|
||||
provider.Mappings[".apk"] = "application/vnd.android.package-archive";
|
||||
}
|
||||
|
||||
// 使用扩展的 StaticFiles 中间件
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
ContentTypeProvider = provider
|
||||
});
|
||||
//开启访问静态文件/wwwroot目录文件,要放在UseRouting前面
|
||||
app.UseStaticFiles();
|
||||
//app.UseStaticFiles();
|
||||
//开启路由访问
|
||||
app.UseRouting();
|
||||
#if DEBUG
|
||||
|
|
|
|||
BIN
ZR.Admin.WebApi/wwwroot/file/2025/0923/1ed00a304e1802ba.apk
Normal file
BIN
ZR.Admin.WebApi/wwwroot/file/2025/0923/1ed00a304e1802ba.apk
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user