-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 403 - Dark Mode #1326
Comments
@vls2021 Could you add more detailed info about the error displayed when making the POST to the Also:
|
What about detailed information of the POST to |
For what I can see, you're hardcoding the const fetchCfg = {
headers: {'X-CSRF-TOKEN': '{{ csrf_token() }}' },
method: 'POST',
}; Read more about this on: https://laravel.com/docs/csrf |
OK, I see, your previous mage was part of a debug procedure then? So, if I understood correctly, the Laravel app you created works on some devices (clients) and do not work on other devices? If that's the case, please try to review the logs at the server, there should be a reason it's rejecting the request with 403. |
Correct. I will check if there is any notification in the log. |
logs have no errors :-( |
You'll need to track down in the server code in what point that 403 response is generated. You can also try to add a logging middleware to grab more information from each request-response cycle: https://medium.com/@mehhfooz/log-requests-and-responses-in-laravel-f859d1f47b74 It's hard to know how to proceed otherwise... What's the difference you see in the request-response cycle when it works in comparison when it do not work? |
I'll check. About how it works, it is as follows: The application is hosted on Amazon EC2. In my work the error appears in the debug, but dark mode works. When I do the test at home, or in another location outside of where I work, the error occurs but the operation does not complete, and 403 appears. It's a big mystery. |
OK, what's that error your are experiencing when the dark mode works? I'm not sure why the request is rejected by 403 Forbidden, I don't think the related controller method is even hit. Maybe some middleware of the "web" group is rejecting the request, or a firewall in the server, and we need to know why first... You may add some logs at |
@vls2021 Why would that be an error? That logic inspects if dark mode state is stored in the current user session and uses that value to check whether it's enabled or not. Otherwise it will fallback to the package configuration value (the default one by config). Returning there doesn't mean anything wrong, unless you are experiencing some sort of exception. |
@vls2021 did you found a solution to this issue? |
Describe the bug
Dark Mode in AdminLte 3 is returning error 403. Permissions are correct. I've already reviewed the code, and everything is normal.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
When I select the icon to activate Dark Mode, the error reported occurs. Some computers work in Dark mode, and save the data in the Database, but in others, it gives a 403 error and does not save the user's option to have or without Dark mode.
Screenshots
Environment
Complete the next environment information.
Additional context
Please, help-me. :-)
The text was updated successfully, but these errors were encountered: