Request failed with status code 403: Unauthorized. #353
Replies: 3 comments 7 replies
-
Hey @haris-pixleedge From my experience this is most likely to do with "stateful domains". By default, it will only allow access from the domain (or subdomain) defined in the Here's what you should do:
LOG_VIEWER_API_STATEFUL_DOMAINS=example.com,www.example.com OR, just update your Let me know how it goes! |
Beta Was this translation helpful? Give feedback.
-
Hey @arukompas I had a similar problem with Laravel 10 / PHP 8.2. I kept getting error 500 while loading the index page: I had to disable \Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class, in the log-viewer.php file to get it to work. These are the traces of the 500 error: After deactivating that middleware, everything worked fine. Thanks for your great job. Next step is makint it multi-language! Jordi |
Beta Was this translation helpful? Give feedback.
-
Log viewer working fine on localhost but get Unauthorized error on production although route is working but can't see the log file due to error.
I've also added the Log viewer Auth to restrict the access in AppServiceProvider:
LogViewer::auth(function ($request) { return $request->user() && in_array($request->user()->email, [ '[email protected]', ]); });
Here is my config/log-viewer file:
`<?php
return [
];
`
Beta Was this translation helpful? Give feedback.
All reactions