• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

How to accurately get the user's IP address?

General Discussion
2
2
277
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    tamphamdev last edited by 4 Mar 2025, 02:52

    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;
    }

    1 Reply Last reply Reply Quote 0
    • Rishabh-Webkul
      Rishabh-Webkul last edited by 7 Mar 2025, 12:53

      Hello @tamphamdev

      Please check your hosted server IP. The same IP address will be added in maintenance mode.

      Thanks & Best Regards

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post