diff options
author | crupest <crupest@outlook.com> | 2019-02-14 23:05:04 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-02-14 23:05:04 +0800 |
commit | 3c140656ebe6ed34dda9356a01dbff205651e641 (patch) | |
tree | 8b8ca7331c9510b897042737a5cbbc0f77b1b736 /Timeline/Startup.cs | |
parent | de90f0413553a23f8ebba1343c6e96c63e0c9748 (diff) | |
download | timeline-3c140656ebe6ed34dda9356a01dbff205651e641.tar.gz timeline-3c140656ebe6ed34dda9356a01dbff205651e641.tar.bz2 timeline-3c140656ebe6ed34dda9356a01dbff205651e641.zip |
Develop user token interface.
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 2a0f437f..6381a58a 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -10,6 +10,10 @@ using System.Text; using Timeline.Configs; using Timeline.Services; using Microsoft.AspNetCore.HttpOverrides; +using Microsoft.AspNetCore.Mvc.Formatters; +using System; +using System.Threading.Tasks; +using Timeline.Formatters; namespace Timeline { @@ -25,7 +29,10 @@ namespace Timeline // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); + services.AddMvc(options => + { + options.InputFormatters.Add(new StringInputFormatter()); + }).SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // In production, the Angular files will be served from this directory services.AddSpaStaticFiles(configuration => |