Kaynağa Gözat

Added requirement of ssl for cookies and anti-forgery token

pull/29/head
Teknikode 6 yıl önce
ebeveyn
işleme
683631e4bf
  1. 4
      Teknik/Global.asax.cs
  2. 1
      Teknik/Web.config

4
Teknik/Global.asax.cs

@ -34,6 +34,8 @@ namespace Teknik @@ -34,6 +34,8 @@ namespace Teknik
AreaRegistration.RegisterAllAreas();
AntiForgeryConfig.RequireSsl = true;
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
@ -43,6 +45,7 @@ namespace Teknik @@ -43,6 +45,7 @@ namespace Teknik
{
HttpContext context = HttpContext.Current;
// Start the generation time stopwatcher
var stopwatch = new Stopwatch();
HttpContext.Current.Items["Stopwatch"] = stopwatch;
stopwatch.Start();
@ -52,6 +55,7 @@ namespace Teknik @@ -52,6 +55,7 @@ namespace Teknik
{
HttpContext context = HttpContext.Current;
// Set the generation time in the header
Stopwatch stopwatch = (Stopwatch)context.Items["Stopwatch"];
stopwatch.Stop();

1
Teknik/Web.config

@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true" />
<customErrors mode="Off" />
<authentication mode="Forms">
<forms domain=".teknik.io" protection="All" enableCrossAppRedirects="true" name="TeknikAuth" />

Yükleniyor…
İptal
Kaydet