mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-12-22 04:18:21 -05:00
fix: middlewares
This commit is contained in:
parent
7296067e21
commit
24cb563cd0
@ -43,9 +43,6 @@ if (app.Environment.IsDevelopment())
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseMiddleware<MinecraftCookieMiddleware>();
|
||||
app.UseMiddleware<CheckRealmOwnerMiddleware>();
|
||||
|
||||
var scope = app.Services.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<DataContext>();
|
||||
|
||||
@ -69,5 +66,8 @@ if (!Enum.IsDefined(typeof(WorkModeEnum), mode.Value))
|
||||
var rewriteOptions = new RewriteOptions().AddRewrite(@"^(?!.*configuration)(.*)$", $"modes/{mode.Value}/$1", true);
|
||||
app.UseRewriter(rewriteOptions);
|
||||
|
||||
app.UseMiddleware<MinecraftCookieMiddleware>();
|
||||
app.UseMiddleware<CheckRealmOwnerMiddleware>();
|
||||
|
||||
Console.WriteLine($"Running in {mode.Value} mode");
|
||||
app.Run();
|
||||
|
Loading…
Reference in New Issue
Block a user