尽管搜索了 Stack OverFlow 并尝试了类似发布的问题中建议的所有内容,但我仍在努力通过此异常。我已经接管了这个网站,并负责让它在 AWS 上运行。目前,我没有做任何冒险的事情,只是将大量内容复制到 Linux AWS VM 上,该 VM 运行 Apache、PHP、beantalk、Laravel 和 MariaDB。该站点设置为使用数据库作为Session和Cache Driver. 我试图将此更改为file和cookie但也有所作为。我已确保key:generate已运行并存储在.env文件中。我已经尝试csrf_token了表单中所有不同版本的输出,但无济于事。很抱歉围绕同一问题发布另一个问题,但希望有其他想法可以帮助我。我的表格中的一个片段......<form method="post" accept-charset="utf-8" autocomplete="off"> <meta name="csrf-token" content="{{ csrf_token() }}"> <div class="form-group"> .......</form>根据@Script47 的建议,我修改了我的表单,遗憾的是,这也不起作用:<form method="post" accept-charset="utf-8" autocomplete="off"> {!! csrf_field() !!} <div class="form-group"> .......</form>进一步的片段:路线 - web.phpRoute::any('/signup', ['as' => 'jobseeker.signup', 'uses' => 'Jobseeker\JobseekerController@signup']);控制器 if ($this->request->isMethod('POST')) { $rules = [ 'email' => 'email|required|unique:jobseekers,email', 'password' => 'required|min:6|confirmed', ]; $validation_messages = ['email.unique' => trans('messages.auth.email.unique.validation', ['login' => route('jobseeker.login'), 'forgot' => route('jobseeker.forgot')])]; $validation = Validator::make($this->request->all(), $rules, $validation_messages); if ($validation->passes()) { Unsubscriber::remove($this->request->get('email')); $jobseeker = Jobseeker::register($this->request->get('email'), $this->request->get('password')); $jobseeker->sendRegistrationNotification(); $this->auth->login($jobseeker); return redirect()->route('account.details'); }疯狂的是,这在现场环境中有效。但是由于我复制了代码并在 AWS 上重新设置它,所以它不起作用。
- 2 回答
- 0 关注
- 228 浏览
添加回答
举报
0/150
提交
取消