aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Startup.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-16 16:39:16 +0800
committercrupest <crupest@outlook.com>2020-06-16 16:39:16 +0800
commit2817fcba6e76150fbd3b09c1096034782841e9e4 (patch)
treeb225cd98d7cecf8c87c6d812a339d744056a1697 /Timeline/Startup.cs
parent1fb561cb58fc51ecb063712dfe94fd60a9a9942a (diff)
downloadtimeline-2817fcba6e76150fbd3b09c1096034782841e9e4.tar.gz
timeline-2817fcba6e76150fbd3b09c1096034782841e9e4.tar.bz2
timeline-2817fcba6e76150fbd3b09c1096034782841e9e4.zip
refactor(back): Fix #108 .
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r--Timeline/Startup.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs
index 2eb08f96..11b6fa9e 100644
--- a/Timeline/Startup.cs
+++ b/Timeline/Startup.cs
@@ -143,16 +143,9 @@ namespace Timeline
{
spa.Options.SourcePath = useMockFrontEnd ? "MockClientApp" : "ClientApp";
- if (!useMockFrontEnd && Environment.IsDevelopment())
+ if (!useMockFrontEnd && (Configuration.GetValue<bool?>(ApplicationConfiguration.UseProxyFrontEndKey) ?? false))
{
- if (Configuration.GetValue<bool?>(ApplicationConfiguration.FrontEndProxyOnlyKey) ?? false)
- {
- spa.UseProxyToSpaDevelopmentServer(new UriBuilder("http", "localhost", 3000).Uri);
- }
- else
- {
- SpaServices.SpaDevelopmentServerMiddlewareExtensions.UseSpaDevelopmentServer(spa, packageManager: "yarn", npmScript: "install-and-start", port: 3000);
- }
+ spa.UseProxyToSpaDevelopmentServer(new UriBuilder("http", "localhost", 3000).Uri);
}
});
}