我写的 curl -d "email=myemail_address" https://mydomain.com/password/reset , 可以获取到请求,但是无论是按网页上的重置按钮,提交的 ajax 请求,还是将网页上的按下重置后抓包得到 ajax 请求转换为 curl 的,都是返回 504 。请问下这是怎么回事。
我检查了 php-fpm,nginx ,后端应该没问题
环境:
ubuntu 16.04 LTS
php 7.0
php-fpm7.0
nginx
这是提交请求的代码:
$(document).ready(function(){
function reset(){
$.ajax({
type:"POST",
url:"/password/reset",
dataType:"json",
data:{
email: $("#email").val(),
},
success:function(data){
if(data.ret == 1){
$("#msg-error").hide(100);
$("#msg-success").show(100);
$("#msg-success-p").html(data.msg);
// window.setTimeout("location.href='/auth/login'", 2000);
}else{
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html(data.msg);
}
},
error:function(jqXHR){
$("#msg-error").hide(10);
$("#msg-error").show(100);
$("#msg-error-p").html("发生错误:"+jqXHR.status);
}
});
}
$("html").keydown(function(event){
if(event.keyCode==13){
login();
}
});
$("#reset").click(function(){
reset();
});
$("#ok-close").click(function(){
$("#msg-success").hide(100);
});
$("#error-close").click(function(){
$("#msg-error").hide(100);
});
})