can not get Horizon dashboard authorization work

Posted 7 months ago by michaelnguyen547

Horizon has new Dashboard Authorization using Gate. I set env to production, and return true inside gate. I get 403 when accessing Horizon, which I don't understand, the gate should allow me to get in.

/**
 * Register the Horizon gate.
 *
 * This gate determines who can access Horizon in non-local environments.
 *
 * @return void
 */
protected function gate()
{
    Gate::define('viewHorizon', function ($user) {
    return true; // still get 403
    });
}

what do I miss?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.