diff options
author | crupest <crupest@outlook.com> | 2020-06-16 16:39:16 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-16 16:39:16 +0800 |
commit | cb8ff68d5e3d5f286676673c530e3a2ee3719772 (patch) | |
tree | 6c00ccfea5602a6502b758c10c7a5a0f0a2607bd /Timeline/Startup.cs | |
parent | 441f8cdd6282a1d4d814b85d353c1553283411ec (diff) | |
download | timeline-cb8ff68d5e3d5f286676673c530e3a2ee3719772.tar.gz timeline-cb8ff68d5e3d5f286676673c530e3a2ee3719772.tar.bz2 timeline-cb8ff68d5e3d5f286676673c530e3a2ee3719772.zip |
refactor(back): Fix #108 .
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 11 |
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);
}
});
}
|