MCPcopy Create free account
hub / github.com/MITK/MITK / IsLocalhostIP

Function IsLocalhostIP

Modules/RESTAPI/src/mitkRestServer.cpp:78–81  ·  view source on GitHub ↗

* @brief Check if an IP address is a localhost address. */

Source from the content-addressed store, hash-verified

76 * @brief Check if an IP address is a localhost address.
77 */
78 bool IsLocalhostIP(const std::string& ip)
79 {
80 return ip == "127.0.0.1" || ip == "::1" || ip == "::ffff:127.0.0.1";
81 }
82
83 /**
84 * @brief Constant-time string comparison to prevent timing attacks.

Callers 1

CheckClientAccessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected