我尝试了很多东西,但仍面临同样的问题。该应用程序在我的localhost中工作正常但在生产中它不允许我使用Ajax会话
自动加载中的加载会话, 完成所有设置, 还尝试了数据库会话和基于文件的会话。
仅在我使用Ajax调用的会话值或在Ajax调用上创建会话后创建问题
有什么建议我该怎么办?
function print_user(user) {
user.providerData.forEach(function(profile) {
$.post("http://domain/connection/user_authentic", {
Provider: profile.providerId,
ProviderUID: profile.uid,
Name: profile.displayName,
Email: profile.email,
PhotoURL: profile.photoURL,
},
function(data, status) {
var result = JSON.parse(data)
if (result.isUserLogged) {
//window.location.reload();
redirectUser('home?msg=welcome');
console.log("Status: " + result.ProfileCompleted);
console.log("Status: " + JSON.stringify(result));
console.log("Redirect your User to Home");
} else {
console.log("Not allowed");
}
});
});
}
function redirectUser(uri) {
var base_url = "";
window.location.href = base_url + uri;
}
在控制器端我只是提取数据并创建会话和返回会话数据