V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
whwq2012
V2EX  ›  前端开发

ss-panel 重置密码时的问题

  •  
  •   whwq2012 · 2016-11-25 11:41:47 +08:00 · 2062 次点击
    这是一个创建于 2706 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我写的 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);
            });
        })
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3417 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:00 · PVG 20:00 · LAX 05:00 · JFK 08:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.