blob: b7ef28d18a0b9da86dee29a4371fcee88b504f3d [file] [log] [blame]
RewriteEngine On
# This rule is meant for autotest installations under a single directory,
# such as when pulling the code from git or from a tarball.
RewriteCond /usr/local/autotest/frontend/client/www/autotest.AfeClient -d
RewriteRule ^/afe((?!\/server\/).*)$ /usr/local/autotest/frontend/client/www/autotest.AfeClient/$1
# This rule is meant for autotest installations from a package such as RPM.
RewriteCond /usr/share/autotest/frontend/client/www/autotest.AfeClient -d
RewriteRule ^/afe((?!\/server\/).*)$ /usr/share/autotest/frontend/client/www/autotest.AfeClient/$1
<Location "/afe">
DirectoryIndex AfeClient.html
# Allow all requests from localhost or corp.google.com subdomains with any port
SetEnvIf Origin "^http(s)?://(localhost|([^/]+\.)?corp\.google\.com)(:[0-9]+)?$" origin_is=$0
Header set Access-Control-Allow-Origin %{origin_is}e env=origin_is
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Location>