summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Startup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Startup.cs')
-rw-r--r--src/SMAPI.Web/Startup.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index 0ea9f7ee..16952124 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -33,7 +33,7 @@ namespace StardewModdingAPI.Web
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
- .Add(new BeanstalkEnvPropsConfigProvider()) //.AddEnvironmentVariables()
+ .Add(new BeanstalkEnvPropsConfigProvider())
.Build();
}
@@ -63,6 +63,10 @@ namespace StardewModdingAPI.Web
{
loggerFactory.AddConsole(this.Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
+
+ if (env.IsDevelopment())
+ app.UseDeveloperExceptionPage();
+
app
.UseCors(policy => policy
.AllowAnyHeader()
@@ -76,6 +80,7 @@ namespace StardewModdingAPI.Web
shouldRewrite: req =>
req.Host.Host != "localhost"
&& !req.Path.StartsWithSegments("/api")
+ && !req.Host.Host.StartsWith("api.")
))
// convert subdomain.smapi.io => smapi.io/subdomain for routing