This commit is contained in:
17
Startup.cs
17
Startup.cs
@@ -1,11 +1,9 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
|
||||
namespace contact
|
||||
{
|
||||
public class Startup
|
||||
@@ -21,16 +19,7 @@ namespace contact
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers().AddNewtonsoftJson();
|
||||
services.AddRazorPages();
|
||||
// services.Configure<CookiePolicyOptions>(options =>
|
||||
// {
|
||||
// // This lambda determines whether user consent for non-essential cookies is needed for a given request.
|
||||
// options.CheckConsentNeeded = context => true;
|
||||
// options.MinimumSameSitePolicy = SameSiteMode.None;
|
||||
// });
|
||||
|
||||
|
||||
// services.AddMvc();//.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
services.AddRazorPages();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
@@ -48,13 +37,13 @@ services.AddRazorPages();
|
||||
|
||||
// app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
// app.UseCookiePolicy();
|
||||
// app.UseCookiePolicy();
|
||||
app.UseRouting();
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapRazorPages();
|
||||
|
||||
|
||||
|
||||
});
|
||||
// app.UseMvc();
|
||||
|
||||
Reference in New Issue
Block a user