mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-15 14:04:41 +08:00
去掉ProtectionData,去掉https
This commit is contained in:
parent
ba15b5acb7
commit
bde3d9dd0f
@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Autofac;
|
||||
using Infrastructure;
|
||||
@ -69,7 +70,7 @@ namespace OpenAuth.Mvc
|
||||
{
|
||||
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
|
||||
//关闭GDPR规范
|
||||
options.CheckConsentNeeded = context => false;
|
||||
options.CheckConsentNeeded = (HttpContext context) => false;
|
||||
options.MinimumSameSitePolicy = SameSiteMode.None;
|
||||
});
|
||||
|
||||
@ -97,8 +98,6 @@ namespace OpenAuth.Mvc
|
||||
services.AddDbContext<OpenAuthDBContext>();
|
||||
|
||||
services.AddHttpClient();
|
||||
|
||||
services.AddDataProtection().PersistKeysToFileSystem(new DirectoryInfo(Configuration["DataProtection"]));
|
||||
|
||||
var sqlsugarTypes = UtilMethods.EnumToDictionary<SqlSugar.DbType>();
|
||||
var dbType = sqlsugarTypes.FirstOrDefault(it =>
|
||||
@ -142,8 +141,8 @@ namespace OpenAuth.Mvc
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
// 生产环境开启HSTS
|
||||
// app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key id="628839e2-4f54-416f-9b66-23fafd007ab0" version="1">
|
||||
<creationDate>2020-04-24T08:26:04.9990208Z</creationDate>
|
||||
<activationDate>2020-04-24T08:26:04.9481282Z</activationDate>
|
||||
<expirationDate>2020-07-23T08:26:04.9481282Z</expirationDate>
|
||||
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
|
||||
<descriptor>
|
||||
<encryption algorithm="AES_256_CBC" />
|
||||
<validation algorithm="HMACSHA256" />
|
||||
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
|
||||
<!-- Warning: the key below is in an unencrypted form. -->
|
||||
<value>blC9xnXdRf5Uytfd1qOaGG6Z9ouurZ4j3p9UUlOs54j0xEhqd01y0AmwUfrJDp37+HZqODq8vgzGz6xBDgv9ZQ==</value>
|
||||
</masterKey>
|
||||
</descriptor>
|
||||
</descriptor>
|
||||
</key>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key id="dbe172a1-9e7b-4886-a94e-de8124a4bd0d" version="1">
|
||||
<creationDate>2020-09-10T03:37:11.831349Z</creationDate>
|
||||
<activationDate>2020-09-10T03:37:11.7080375Z</activationDate>
|
||||
<expirationDate>2020-12-09T03:37:11.7080375Z</expirationDate>
|
||||
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
|
||||
<descriptor>
|
||||
<encryption algorithm="AES_256_CBC" />
|
||||
<validation algorithm="HMACSHA256" />
|
||||
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
|
||||
<!-- Warning: the key below is in an unencrypted form. -->
|
||||
<value>Db49pYY35Nbu4v2FWzc+MuYyu8RO8z/T8pkaHAH/M6aeVmjyeXaBfHnmOiS5LMitCKDqGBTUh15xNCErxEvQzg==</value>
|
||||
</masterKey>
|
||||
</descriptor>
|
||||
</descriptor>
|
||||
</key>
|
Loading…
Reference in New Issue
Block a user