• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RewriteEngine On
2
3# This rule is meant for autotest installations under a single directory,
4# such as when pulling the code from git or from a tarball.
5RewriteCond /usr/local/autotest/frontend/client/www/autotest.TkoClient -d
6RewriteRule ^/new_tko((?!\/server\/).*)$ /usr/local/autotest/frontend/client/www/autotest.TkoClient/$1
7
8# This rule is meant for autotest installations from a package such as RPM.
9RewriteCond /usr/share/autotest/frontend/client/www/autotest.TkoClient -d
10RewriteRule ^/new_tko((?!\/server\/).*)$ /usr/share/autotest/frontend/client/www/autotest.TkoClient/$1
11
12<Location "/new_tko">
13    DirectoryIndex TkoClient.html
14    # Allow all requests from localhost or corp.google.com subdomains with any port
15    SetEnvIf Origin "^http(s)?://(localhost|([^/]+\.)?corp\.google\.com)(:[0-9]+)?$" \
16        AccessControlAllowOriginValue=$0 AccessControlAllowCredentialsValue=true
17    Header set Access-Control-Allow-Origin %{AccessControlAllowOriginValue}e \
18        env=AccessControlAllowOriginValue
19    Header set Access-Control-Allow-Credentials %{AccessControlAllowCredentialsValue}e \
20        env=AccessControlAllowCredentialsValue
21    <IfVersion >= 2.4>
22        Require all granted
23    </IfVersion>
24</Location>
25