即使我Route::get('/', 'WelcomeController@index');
内已routes.php
,但当我访问myherokuappurl.heroku.com
时(这不是真正的网址),它会显示403错误。
WelcomeController
是工匠的脚手架,它包含:
public function __construct() {
$this->middleware('guest');
}
public function index() {
return view('welcome');
}
有什么想法吗?使用laravel 5
编辑:它在 Laravel / Homestead 开发环境中正常运行
更新1:这些是我的heroku网络服务器设置
// Procfile
web: vendor/bin/heroku-php-nginx -C nginx.conf public/
// nginx.conf
location / {
try_files $uri $uri/ /index.php?$query_string;
}
更新2 :403仅在/
路由上发生,但/myresource/index
或/myresource/create
工作正常