mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
change StaticFilesServer to use Controller
This commit is contained in:
parent
90ccfe4162
commit
827acf0282
3 changed files with 43 additions and 10 deletions
|
|
@ -36,7 +36,7 @@ public class Startup
|
|||
|
||||
var mareSettings = Configuration.GetRequiredSection("MareSynchronos");
|
||||
|
||||
//services.AddControllers();
|
||||
services.AddControllers();
|
||||
|
||||
var defaultMethodConfig = new MethodConfig
|
||||
{
|
||||
|
|
@ -99,18 +99,10 @@ public class Startup
|
|||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions()
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(Configuration.GetRequiredSection("MareSynchronos")["CacheDirectory"]),
|
||||
RequestPath = "/cache",
|
||||
ServeUnknownFileTypes = true,
|
||||
|
||||
});
|
||||
|
||||
app.UseEndpoints(e =>
|
||||
{
|
||||
e.MapGrpcService<FileService>();
|
||||
//e.MapControllers();
|
||||
e.MapControllers();
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue