@%@UCRWARNING=# @%@

### OX App Suite ###
<Directory /var/www/appsuite>
@!@
if configRegistry.is_false('ox/frontend/appsuite/enabled'):
	print '        Order deny,allow'
	print '        Deny from all'
@!@
        Options None +SymLinksIfOwnerMatch
        AllowOverride Indexes FileInfo
</Directory>

### OX6 ###
# deflate
AddOutputFilterByType DEFLATE text/html text/plain text/javascript application/javascript text/css text/xml application/xml text/x-js application/x-javascript

# pre-compressed files
AddType text/javascript .jsz
AddType text/css .cssz
AddType text/xml .xmlz
AddType text/plain .po

AddEncoding gzip .jsz .cssz .xmlz
SetEnvIf Request_URI "\.(jsz|cssz|xmlz)$" no-gzip

ExpiresActive On

@!@
if 'ox/caldav/useragent/whitelist' in configRegistry:
	print ' [OR]\n'.join([
		'RewriteCond %%{HTTP_USER_AGENT} %s' % userAgent
		for userAgent in configRegistry['ox/caldav/useragent/whitelist'].split('|')
		if userAgent
	])
	print 'RewriteRule (.*) http://localhost:8009/servlet/dav$1 [P]'
@!@

<Location /ox6>
@!@
if configRegistry.is_false('ox/frontend/ox6/enabled'):
	print '        Order deny,allow'
	print '        Deny from all'
@!@
        # Expires (via ExpiresByType to override global settings)
        ExpiresByType image/gif "access plus 6 months"
        ExpiresByType image/png "access plus 6 months"
        ExpiresByType image/jpg "access plus 6 months"
        ExpiresByType image/jpeg "access plus 6 months"
        ExpiresByType text/css "access plus 6 months"
        ExpiresByType text/html "access plus 6 months"
        ExpiresByType text/xml "access plus 6 months"
        ExpiresByType text/javascript "access plus 6 months"
        ExpiresByType text/x-js "access plus 6 months"
        ExpiresByType application/x-javascript "access plus 6 months"
        ExpiresDefault "access plus 6 months"
        Header append Cache-Control "private"
        Header unset Last-Modified
        Header unset Vary
        # Strip version
        RewriteEngine On
        RewriteRule v=\w+/(.+) $1 [L]
        # Turn off ETag
        Header unset ETag
        FileETag None
</Location>

<Location /ox6/ox.html>
@!@
if configRegistry.is_false('ox/frontend/ox6/enabled'):
	print '        Order deny,allow'
	print '        Deny from all'
@!@
        ExpiresByType text/html "now"
        ExpiresDefault "now"
        Header unset Last-Modified
        Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
        # Turn off ETag
        Header unset ETag
        FileETag None
</Location>

<Location /ox6/index.html>
@!@
if configRegistry.is_false('ox/frontend/ox6/enabled'):
	print '        Order deny,allow'
	print '        Deny from all'
@!@
        ExpiresByType text/html "now"
        ExpiresDefault "now"
        Header unset Last-Modified
        Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
        # Turn off ETag
        Header unset ETag
        FileETag None
</Location>
