前端是vue 接口使用yii2 报 401 Unauthorized
1、访问http://****/#/login报{"name":"Unauthorized","message":"Your request was made with invalid credentials.","code":0,"status":401,"type":"yii\\web\\UnauthorizedHttpException"}
2、看了一下项目目录 访问地址有改成 http://www.back.com/index.html#/login
又在nginx添加伪静态:
location ~ ^/.*$ {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php last;
}
}
访问就可以了
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:36
阅读量:71
阅读量:161
阅读量:171
阅读量:84