Home | History | Annotate | Download | only in conf
      1 RewriteEngine 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.
      5 RewriteCond /usr/local/autotest/frontend/client/www/autotest.AfeClient -d
      6 RewriteRule ^/afe((?!\/server\/).*)$ /usr/local/autotest/frontend/client/www/autotest.AfeClient/$1
      7 
      8 # This rule is meant for autotest installations from a package such as RPM.
      9 RewriteCond /usr/share/autotest/frontend/client/www/autotest.AfeClient -d
     10 RewriteRule ^/afe((?!\/server\/).*)$ /usr/share/autotest/frontend/client/www/autotest.AfeClient/$1
     11 
     12 <Location "/afe">
     13     DirectoryIndex AfeClient.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