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 | 7024bc9666e62cc33f651e7a060235d17bd51f25 (patch) | |
tree | b9762a15e83391d8b7b4d76aa76f125557bb0e51 /Timeline/Startup.cs | |
parent | 44645b381ffe399e444444cc0011287d4e09fd7e (diff) | |
download | timeline-7024bc9666e62cc33f651e7a060235d17bd51f25.tar.gz timeline-7024bc9666e62cc33f651e7a060235d17bd51f25.tar.bz2 timeline-7024bc9666e62cc33f651e7a060235d17bd51f25.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 => |