修改跨越顺序
parent
90a154c30c
commit
d7bb7ef294
|
@ -168,6 +168,8 @@ namespace IRaCIS.Core.API
|
||||||
|
|
||||||
app.UseForwardedHeaders();
|
app.UseForwardedHeaders();
|
||||||
|
|
||||||
|
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
||||||
|
|
||||||
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
|
//不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication.
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
@ -219,7 +221,7 @@ namespace IRaCIS.Core.API
|
||||||
//文件伺服 必须带Token 访问
|
//文件伺服 必须带Token 访问
|
||||||
//app.UseIRacisHostStaticFileStore(env);
|
//app.UseIRacisHostStaticFileStore(env);
|
||||||
|
|
||||||
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,12 @@ namespace IRaCIS.Core.API
|
||||||
ServeUnknownFileTypes = true,
|
ServeUnknownFileTypes = true,
|
||||||
DefaultContentType = "application/octet-stream"
|
DefaultContentType = "application/octet-stream"
|
||||||
|
|
||||||
});
|
// // Set up custom content types - associating file extension to MIME type
|
||||||
|
//var provider = new FileExtensionContentTypeProvider();
|
||||||
|
// // Add new mappings
|
||||||
|
// provider.Mappings[".myapp"] = "application/x-msdownload";
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue