Browse Source

Added X-Requested-With header to ajax calls.

pull/40/head
Teknikode 6 years ago
parent
commit
e8eea8404e
  1. 2
      Teknik/Scripts/Common.js
  2. 2
      Teknik/Web.config

2
Teknik/Scripts/Common.js

@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
type: "POST",
url: form.attr('action'),
data: form.serialize(),
headers: {'X-Requested-With': 'XMLHttpRequest'},
xhrFields: {
withCredentials: true
},
@ -45,6 +46,7 @@ @@ -45,6 +46,7 @@
type: "POST",
url: form.attr('action'),
data: form.serialize(),
headers: {'X-Requested-With': 'XMLHttpRequest'},
xhrFields: {
withCredentials: true
},

2
Teknik/Web.config

@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
<customHeaders>
<add name="Access-Control-Allow-Credentials" value="true" />
<add name="Access-Control-Allow-Methods" value="GET, PUT, POST, DELETE, OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Accept, Content-Type" />
<add name="Access-Control-Allow-Headers" value="Accept, Content-Type, X-Requested-With" />
<add name="strict-transport-security" value="max-age=31536000; includeSubdomains" />
</customHeaders>
</httpProtocol>

Loading…
Cancel
Save