<!--
	CDN buckets:

		- d1ui9i2jp8fkao.cloudfront.net

			- img.appstatic.opera.com
			- img\d+.appstatic.opera.com

		- d2jc9zwbrclgz3.cloudfront.net

		- opera.globalsportsmedia.com.edgesuite.net

			- sports.opera.com


	Nonfunctional domains:

		- devfiles.myopera.com *
		- thumbs.myopera.com

		- opera.com subdomains:

			- (www.)
			- blackberry.apps **
			- html5.apps **
			- iphone.apps **
			- java.apps **
			- windows-mobile.apps **
			- ar
			- arc
			- business
			- cn
			- de
			- deb *
			- fr
			- ftp
			- get.geo	(refused)
			- get
			- get\d
			- get-ice-1
			- get-tsw-1
			- help
			- in
			- jp
			- labs
			- media
			- mini
			- my-beta		(redirects to http)
			- my-next		(reset, expired 2013-03-06)
			- redir
			- ru
			- snapshot *
			- sports		(503, akamai)
			- tw

		- (www.)operamini.com

	* Times out
	* Redirects to http, mismatched, CN: apps.opera.com


	Problematic opera.com subdomains:

		- img.appstatic *
		- img\d+.appstatic *
		- mobilestore		(redirects to apps, mismatched, CN: apps.opera.com)

	* Cloudfront


	Partially covered opera.com subdomains:

		- apps *
		- my.cn *
		- dev *
		- (www.)my *
		- portal *
		- widgets *

	* Some paths redirect to http


	Fully covered domains:

		- files.myopera.com
		- mail.myopera.com
		- static.myopera.com

		- opera.com subdomains:

			- addons
			- dev-beta
			- idp
			- mail
			- micropage
			- upload.my
			- ssl
			- static-portal
			- unite

		- btsfiles.operasoft.com
		- bugfiles.operasoft.com

-->
<ruleset name="Opera" default_off="needs testing">

	<target host="*.opera.com" />
		<!--
			These redirect to http.
							-->
		<exclusion pattern="^http://apps\.opera\.com/(?:\w\w(?:_\w\w)?/(?:$|\?|.+\.htm)|(?:cs|script)s/opt/|index\.php)" />
		<!--
			user/avatar.pl redirects to static.myopera.com/avatars/
			in an unpredictable fashion.
							-->
		<exclusion pattern="^http://dev\.opera\.com/(?:$|articles|author/|labs$|user/avatar\.pl|sdk/|(?!login|signup)\w+(?:$|\?))" />
		<exclusion pattern="^http://(?:my\.cn|(?:www\.)?my)\.opera\.com/(?:$|\w+/blog/|community/(?:$|api/|blogs/|campaign/|customize/|explore/|forums/|groups/|help/|members$|opera/|photos$|terms-of-service/|users/avatar\.pl)|(?!login|signup)\w+/?(?:$|\?)|\w+/tags/show\.pl)" />
		<exclusion pattern="^http://portal\.opera\.com/(?!accounts/login)" />
		<exclusion pattern="^http://widgets\.opera\.com/(?:$|\?|author/|category/|general/|new/|popular/|rated/|user/(?:avatar|picture)/|users/|widget/(?:\d+|download)/)" />
		<!--
			These don't seem to work over https.
								-->
		<exclusion pattern="^http://(?:arc?|business|cn|deb?|fr|get\.geo|get\d?|get-[\w-]+|help|in|jp|labs|mobilestore|my-beta|my-next|redir|ru|snapshot|sports|tw|www)\.opera\.com/" />
		<exclusion pattern="^http://(?:devfile|thumb)s\.myopera\.com/" />
	<target host="myopera.com" />
	<target host="*.myopera.com" />
	<target host="*.operasoft.com" />


	<securecookie host="^(?:addons|bugs|idp|\.mail|ssl)\.opera\.com$" name=".+" />
	<securecookie host="^btsfiles\.operasoft\.com$" name=".+" />


	<rule from="^http://img\.appstatic\.opera\.com/"
		to="https://d1ui9i2jp8fkao.cloudfront.net/" />

	<!--	Redirects to http first.
						-->
	<rule from="^http://my(\.cn)?\.opera\.com/(login|signup)"
		to="https://my$1.opera.com/community/$2" />

	<rule from="^http://portal\.opera\.com/accounts/login$"
		to="https://portal.opera.com/accounts/login/" />

	<rule from="^http://([^/:@]+\.)?(my)?opera\.com/"
		to="https://$1$2opera.com/" />

	<rule from="^http://b(ts|ug)files\.operasoft\.com/"
		to="https://b$1files.operasoft.com/" />

</ruleset>
