Jump to content

После перехода на Cloudflare в списке пользователей показывает IP Cloudflare


Zero108

Recommended Posts

Собственно, вопрос, можно ли что-то поменять в коде, чтобы в списке пользователей показывало реальные IP, а не IP Cloudflare? Cloudflare настроен как анонимный прокси.

Screenshot_1.jpg

Edited by Zero108
Link to comment
Share on other sites

в index.php добавь перед началом дефайна

	if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
		$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
	}

 

Link to comment
Share on other sites

Можно в админке одну настройку включить. 

Расширенные настройки > Доверять прокси IP-адресам

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Ваша ссылка была автоматически строена.   Отображать как обычную ссылку

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...