]> git.somenet.org - pub/jan/aic18.git/blob - PdfService/Startup.cs
fixed spelling mistake
[pub/jan/aic18.git] / PdfService / Startup.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Threading.Tasks;
5 using Microsoft.AspNetCore.Builder;
6 using Microsoft.AspNetCore.Hosting;
7 using Microsoft.AspNetCore.HttpsPolicy;
8 using Microsoft.AspNetCore.Mvc;
9 using Microsoft.Extensions.Configuration;
10 using Microsoft.Extensions.DependencyInjection;
11 using Microsoft.Extensions.Logging;
12 using Microsoft.Extensions.Options;
13
14 namespace PdfService
15 {
16     public class Startup
17     {
18         public Startup(IConfiguration configuration)
19         {
20             Configuration = configuration;
21         }
22
23         public IConfiguration Configuration { get; }
24
25         // This method gets called by the runtime. Use this method to add services to the container.
26         public void ConfigureServices(IServiceCollection services)
27         {
28             services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
29         }
30
31         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
32         public void Configure(IApplicationBuilder app, IHostingEnvironment env)
33         {
34             if (env.IsDevelopment())
35             {
36                 app.UseDeveloperExceptionPage();
37             }
38             else
39             {
40                 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
41                 app.UseHsts();
42             }
43
44             app.UseHttpsRedirection();
45             app.UseMvc();
46         }
47     }
48 }