<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cdn &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/cdn/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Sat, 19 Apr 2014 16:52:20 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>MediaWiki behind CloudFlare</title>
		<link>https://luxing.im/mediawiki-behind-cloudflare/</link>
					<comments>https://luxing.im/mediawiki-behind-cloudflare/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sat, 19 Apr 2014 16:51:04 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[cloudflare]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=363</guid>

					<description><![CDATA[When you set up with CloudFlare with MediaWiki, the IP won&#8217;t be showing correctly. Here is the how-to derived from CloudFlare&#8217;s official MediaWiki FAQ. The official document is old and doesn&#8217;t work for the latest version of MediaWiki. The modifications below are based on version MediaWiki 1.22.4 First edit includes/GlobalFunctions.php: Around line 1201 from $forward &#8230; <p class="link-more"><a href="https://luxing.im/mediawiki-behind-cloudflare/" class="more-link">Continue reading<span class="screen-reader-text"> "MediaWiki behind CloudFlare"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>When you set up with CloudFlare with MediaWiki, the IP won&#8217;t be showing correctly. Here is the how-to derived from CloudFlare&#8217;s official <a href="https://support.cloudflare.com/hc/en-us/articles/200170806-How-do-I-restore-original-visitor-IP-with-MediaWiki-" target="_blank">MediaWiki FAQ</a>. The official document is old and doesn&#8217;t work for the latest version of MediaWiki.</p>
<p><span id="more-363"></span><br />
The modifications below are based on version MediaWiki 1.22.4<br />
First edit <strong>includes/GlobalFunctions.php</strong>:</p>
<p>Around line 1201 from</p>
<pre>$forward = "\t(proxied via {$_SERVER['REMOTE_ADDR']}{$forward})";</pre>
<p>Change to</p>
<pre>$forward = "\t(proxied via {$_SERVER['HTTP_CF_CONNECTING_IP']}{$forward})";</pre>
<p>Edit <strong>WebRequest.php</strong>, find line near </p>
<pre>$ipchain = $_SERVER['REMOTE_ADDR'];</pre>
<p>Around line 1097 to 1108, change all <em>REMOTE_ADDR</em> to <strong>HTTP_CF_CONNECTING_IP</strong>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/mediawiki-behind-cloudflare/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">363</post-id>	</item>
	</channel>
</rss>
