Commit 4506a3ee authored by Christophe Maudoux's avatar Christophe Maudoux

CORS prevents to submit AuthSSL AJAX request with other domains (#1636)

parent 9cfef329
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
tryssl = () -> tryssl = () ->
console.log 'Call URL -> ', window.datas.sslHost console.log 'Call URL -> ', window.datas.sslHost
$.ajax window.datas.sslHost, $.ajax window.datas.sslHost,
dataType: 'json' dataType: 'jsonp'
# PE_BADCREDENTIALS # PE_BADCREDENTIALS
statusCode: statusCode:
401: () -> 401: () ->
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
tryssl = () -> tryssl = () ->
console.log 'Call URL -> ', window.datas.sslHost console.log 'Call URL -> ', window.datas.sslHost
$.ajax window.datas.sslHost, $.ajax window.datas.sslHost,
dataType: 'json' dataType: 'jsonp'
# PE_BADCREDENTIALS # PE_BADCREDENTIALS
statusCode: statusCode:
401: () -> 401: () ->
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
tryssl = function() { tryssl = function() {
console.log('Call URL -> ', window.datas.sslHost); console.log('Call URL -> ', window.datas.sslHost);
return $.ajax(window.datas.sslHost, { return $.ajax(window.datas.sslHost, {
dataType: 'json', dataType: 'jsonp',
statusCode: { statusCode: {
401: function() { 401: function() {
$('#lform').submit(); $('#lform').submit();
......
(function(){var tryssl;tryssl=function(){console.log("Call URL -> ",window.datas.sslHost);return $.ajax(window.datas.sslHost,{dataType:"json",statusCode:{401:function(){$("#lform").submit();return console.log("Error code 401")}},success:function(data){$("#lform").submit();return console.log("Success -> ",data)},error:function(){$("#lform").submit();return console.log("Error")}})};$(document).ready(function(){return $(".sslclick").on("click",tryssl)})}).call(this); (function(){var tryssl;tryssl=function(){console.log("Call URL -> ",window.datas.sslHost);return $.ajax(window.datas.sslHost,{dataType:"jsonp",statusCode:{401:function(){$("#lform").submit();return console.log("Error code 401")}},success:function(data){$("#lform").submit();return console.log("Success -> ",data)},error:function(){$("#lform").submit();return console.log("Error")}})};$(document).ready(function(){return $(".sslclick").on("click",tryssl)})}).call(this);
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
tryssl = function() { tryssl = function() {
console.log('Call URL -> ', window.datas.sslHost); console.log('Call URL -> ', window.datas.sslHost);
return $.ajax(window.datas.sslHost, { return $.ajax(window.datas.sslHost, {
dataType: 'json', dataType: 'jsonp',
statusCode: { statusCode: {
401: function() { 401: function() {
$('#lformSSL').submit(); $('#lformSSL').submit();
......
(function(){var tryssl;tryssl=function(){console.log("Call URL -> ",window.datas.sslHost);return $.ajax(window.datas.sslHost,{dataType:"json",statusCode:{401:function(){$("#lformSSL").submit();return console.log("Error code 401")}},success:function(data){$("#lformSSL").submit();return console.log("Success -> ",data)},error:function(){$("#lformSSL").submit();return console.log("Error")}})};$(document).ready(function(){return $(".sslclick").on("click",tryssl)})}).call(this); (function(){var tryssl;tryssl=function(){console.log("Call URL -> ",window.datas.sslHost);return $.ajax(window.datas.sslHost,{dataType:"jsonp",statusCode:{401:function(){$("#lformSSL").submit();return console.log("Error code 401")}},success:function(data){$("#lformSSL").submit();return console.log("Success -> ",data)},error:function(){$("#lformSSL").submit();return console.log("Error")}})};$(document).ready(function(){return $(".sslclick").on("click",tryssl)})}).call(this);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment