XMLHttpRequest cannot load XX. Response to preflight request doesn't pass access control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '' is therefore not allowed access.mb --configfile ./test/imposters.ejs --allowInjection --allowCORS{
"imposters": [ <% include irisServer.ejs %> ]
}
{
"port": 8124,
"protocol": "http",
"stubs": [
{
"predicates": [{
"equals": { "method": "POST", "path": "/login" }
}],
"responses": [{ "inject": "<%- stringify(filename, 'authResponse.js') %>" }]
}
]
}function stateResponse(request, state, logger) {
var parsedBody = JSON.parse(request.body);
return {
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin' : '*'
},
body: JSON.stringify({ 'token': MD5(parsedBody.user + 'secret'), 'user': parsedBody.user }); // OMITED MD5 FUNCTION IS TO BIG
};
}$http.defaults.useXDomain = true;
$http.defaults.withCredentials = true;
delete $http.defaults.headers.common['X-Requested-With'];
$http.defaults.headers.common['Access-Control-Allow-Origin'] = '*';--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
XMLHttpRequest cannot load http://localhost:8124/login. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.function stateResponse(request, state, logger) {
var parsedBody = JSON.parse(request.body);
return {
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin' : '*',
'Access-Control-Allow-Credentials': trueTo unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
function stateResponse(request, state, logger) {
var parsedBody = JSON.parse(request.body);
return {
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin' : 'localhost:8080',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
},
body: JSON.stringify({ 'token': MD5(parsedBody.user + 'secret'), 'user': parsedBody.user })
};
}'Access-Control-Allow-Headers': 'accept, accept-encoding, access-control-allow-headers, access-control-allow-origin, content-type, accept-language'To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin' : 'localhost:8080',
'Access-Control-Allow-Credentials': 'true',
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
'Access-Control-Allow-Headers': 'accept, accept-encoding, access-control-allow-headers, access-control-allow-origin, content-type, accept-language'
},To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-discuss+unsub...@googlegroups.com.