<!--
	For rules causing false/broken MCB, see Tumblr.com-falsemixed.xml.


	CDN buckets:

		- s3.amazonaws.com/assets.tumblr.com/
		- s3.amazonaws.com/data.tumblr.com/
		- s3.amazonaws.com/static.tumblr.com/

		- d2g9v1gts353nd.cloudfront.net

			- a
			- v

		- d2glp9604qyu8g.cloudfront.net

			- assets

		- d2pi0bc9ewx28h.cloudfront.net

			- static

		- degx20iof9o2c.cloudfront.net

			- vt

		- dssedc4qxg7o6.cloudfront.net

			- media
			- \d+.media

		- duktadvmmowhi.cloudfront.net

			- secure.static

		- cs38.wac.edgecastcdn.net/...

			- secure.assets

		- wac.19b6.edgecastcdn.net/??19B6/

			- platform.tumblr.com

		- gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/
		- a.tumblr.com.edgesuite.net
		- assets.tumblr.com.edgesuite.net
		- media.tumblr.com.edgesuite.net
		- static.tumblr.com.edgesuite.net
		- vt.tumblr.com.edgesuite.net


	Nonfunctional subdomains:

		- developers *
		- engineering *
		- staff *

	* Dropped


	Problematic subdomains:

		- media		(cert only matches *.media)
		- 25.media	(akamai)
		- 34.media	(akamai)
		- 35.media	(akamai)
		- 37.media	(akamai)


	Fully covered subdomains:

		- a
		- assets	(→ d2glp9604qyu8g.cloudfront.net)
		- origin.assets
		- secure.assets
		- data
		- media		(→ 31.media)
		- \d+.media:
		- platform
		- origin.platform
		- static	(→ d2g9v1gts353nd.cloudfront.net)
		- secure.static
		- v
		- vt


	Mixed content:

		- Scripts on www from assets *

		- Images on www from assets *

	* Secured by us

-->
<ruleset name="Tumblr (partial)">

	<target host="tumblr.com" />
	<target host="*.tumblr.com" />
		<!--
			These scripts now break when rewritten to s://assets, secure.assets, or cloudfront:

				- dashboard.js breaks "like"ing
				- jquery_backbone_lodash.js and polyfills.js individually cause the editor to spawn another page
				- posting.js breaks opening the editor
				- tiny_mce.js breaks editing

			and lo, many bellyfeel boos were heard.
								-->
		<!--exclusion pattern="^http://assets\.tumblr\.com/assets/scripts/(dashboard|polyfills|posting|vendor/(jquery_backbone_lodash|tiny_mce_3_5_10/tiny_mce))\.js" /-->
		<!--
			And so was one "oh, fsck it."
							-->
		<exclusion pattern="^http://assets\.tumblr\.com/assets/scripts/" />


	<!--	Tracking cookies:
					-->
	<securecookie host="^(?:secure\.assets|www)\.tumblr\.com$" name="^__utmf$" />


	<!--	These paths 302 to http:

			- about$
			- apps$
			- audio_file/
			- dashboard$
			- dashboard/iframe
			- developers$
			- docs/en/api/v2$
			- docs/en/buttons$
			- goto/
			- jobs$
			- like/
			- policy/en/community$
			- policy/en/privacy$
			- policy/en/terms_of_service$
			- press$
			- reblog/
			- share$
			- sponsors$
			- submit_form_js/
			- themes/
			- tips$
			- upload/image
					-->
	<rule from="^http://(www\.)?tumblr\.com/(?=$|(?:dmca|forgot_password|impixu|login|logout|register|svc/teaser|teaser)(?:$|[#?/])|examples/share/\w|images/|javascript/|photo/|settings/|svc/log/)"
		to="https://$1tumblr.com/" />

	<rule from="^http://(?:(?:25|34|35|37)\.)?media\.tumblr\.com/"
		to="https://31.media.tumblr.com/" />

	<rule from="^http://(a|(?:origin\.|secure\.)?assets|\d+\.media|platform|origin\.platform|secure\.static|vt?)\.tumblr\.com/"
		to="https://$1.tumblr.com/" />

	<rule from="^http://data\.tumblr\.com/"
		to="https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/" />

	<rule from="^http://static\.tumblr\.com/"
		to="https://d2pi0bc9ewx28h.cloudfront.net/" />

</ruleset>
