Middleware doesn't print log
Here's a grammatically corrected version of your text:
Hello everyone, I am encountering a strange error in my middleware I created a middleware that redirects the user to the registration page if the authentication token does not exist or is invalid everything works fine on the Windows environment, and the server (Ubuntu environment) seems fine when I first log in allowing me to access the dashboard without any issue. However, when I refresh the page, I get redirected to the registration page, even though the token exists and is valid and After further investigation I found that the issue is in the last line of the code. I tried to print the error, but nothing is printed, even after I disabled the redirect. Interestingly, after disabling the redirect, the dashboard was able to use the token to identify the user.
Hello everyone, I am encountering a strange error in my middleware I created a middleware that redirects the user to the registration page if the authentication token does not exist or is invalid everything works fine on the Windows environment, and the server (Ubuntu environment) seems fine when I first log in allowing me to access the dashboard without any issue. However, when I refresh the page, I get redirected to the registration page, even though the token exists and is valid and After further investigation I found that the issue is in the last line of the code. I tried to print the error, but nothing is printed, even after I disabled the redirect. Interestingly, after disabling the redirect, the dashboard was able to use the token to identify the user.
