log-viewer
log-viewer copied to clipboard
Api stateful domains config option
In a project that runs on 2 domains, I had an issue where the log-viewer API calls failed and caused an 'this action is unauthorized' on the secondary domain. After some digging, I found that I needed to set the sanctum.stateful
config option. The problem is that my project does not use Sanctum. I had to create a dummy sanctum.php
config to create and set that config variable.
That's why I propose to make that an option in the log-viewer config so that it can be easily customized even when you don't use Sanctum in your project.
I made the change a non-breaking change by still checking and using config('sanctum.stateful')
if the config('log-viewer.api_stateful_domains')
is not set.