Browse Source

Added X-Requested-With header to ajax calls.

tags/2.0.6
Teknikode 3 years ago
parent
commit
e8eea8404e
2 changed files with 3 additions and 1 deletions
  1. 2
    0
      Teknik/Scripts/Common.js
  2. 1
    1
      Teknik/Web.config

+ 2
- 0
Teknik/Scripts/Common.js View File

@@ -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 @@
type: "POST",
url: form.attr('action'),
data: form.serialize(),
headers: {'X-Requested-With': 'XMLHttpRequest'},
xhrFields: {
withCredentials: true
},

+ 1
- 1
Teknik/Web.config View File

@@ -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