How to accurately get the user's IP address?
-
I deployed my website using Docker, and I can't get the exact user IP in maintenance mode; instead, it shows Docker's local IP. Does anyone have a solution?
https://github.com/bagisto/bagisto/blob/2.2/packages/Webkul/Core/src/Http/Middleware/CheckForMaintenanceMode.php#L75
if (
in_array($request->ip(), $this->excludedIPs)
|| $this->shouldPassThrough($request)
|| ! (bool) core()->getCurrentChannel()->is_maintenance_on
) {
return $response;
} -
Hello @tamphamdev
Please check your hosted server IP. The same IP address will be added in maintenance mode.
Thanks & Best Regards