[backend] Add disclaimer when running in Development environment
This commit is contained in:
parent
b72a22b9b0
commit
4620758701
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ public static class WebApplicationExtensions {
|
|||
app.Logger.LogInformation("Iceshrimp.NET v{version} ({domain})", instanceConfig.Version,
|
||||
instanceConfig.AccountDomain);
|
||||
|
||||
if (app.Environment.IsDevelopment()) {
|
||||
app.Logger.LogWarning("The hosting environment is set to Development.");
|
||||
app.Logger.LogWarning("This application will not validate the Host header for incoming requests.");
|
||||
app.Logger.LogWarning("If this is not a local development instance, please set the environment to Production.");
|
||||
}
|
||||
|
||||
var provider = app.Services.CreateScope();
|
||||
var context = provider.ServiceProvider.GetService<DatabaseContext>();
|
||||
if (context == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue