Getting 403 error

As the title said itself, I'm getting 403 in non-local environment. I already added canAccessFilament() in my user model, but I slightly modify it so that it can accommodate filament shield.
public function canAccessFilament(): bool
{
return $this->hasAnyRole($this->roles);
}
public function canAccessFilament(): bool
{
return $this->hasAnyRole($this->roles);
}
What went wrong?
5 Replies
Dennis Koch
Dennis Koch2y ago
Is this only on filament routes? As this is a server error not a Laravel error
ZedoX
ZedoX2y ago
This is an nginx 403 error, not related to filament
Resonance
ResonanceOP2y ago
Does nginx and filament give different 403 error? Yes, all of my projects are filament routes I just pushed a changes to my repo and it is all working fine, now it gives me this. So my first thought that It was related to canAccessFilament
Dennis Koch
Dennis Koch2y ago
Filament should return one in the look of Laravel. You can add a non filament route and see whether it works. Maybe also return a abort(400) to see how the Laravel errors look on that system.
Resonance
ResonanceOP2y ago
I might try this, thank you for the tip And, it is a server issue. Sadly the service don't allow debugging since the port is already used by the deployment itself. Thank you for the help
Want results from more Discord servers?
Add your server