盡管搜索了 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 關注
- 275 瀏覽
添加回答
舉報
0/150
提交
取消
