title: Amazon S3 - add local computer to list of allowed referers
body: <p>I have a bucket policy in place (below) that only allows access to S3 from our remote website (to prevent hotlinking).  I'd like to also be able to access the files when working from our local computer.  I've tried adding my ip address, local ip, and localhost to aws:Referer but that hasn't worked.  </p>
  
  <p>For the task I'm trying to accomplish, I'd like to be able to directly access the files in my browser using the direct link: <a href="https://s3.amazonaws.com/%5bbucket%5d/%5bfilename%5d" rel="nofollow">https://s3.amazonaws.com/[bucket]/[filename]</a></p>
  
  <p>Any suggestions?  Thanks!</p>
  
  <pre><code>{
  "Version": "2012-10-17",
  "Id": "http referer policy example",
  "Statement": [
      {
          "Sid": "Allow get requests referred by www.mysite.com and mysite.com",
          "Effect": "Allow",
          "Principal": "*",
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::[bucketname]/*",
          "Condition": {
              "StringLike": {
                  "aws:Referer": [
                      "http://www.[mysite].com/*",
                      "http://192.168.1.6/*",
                      "http://foundwaves.com/*",
                      "http://[ip]/*",
                      "http://localhost/*"
                  ]
              }
          }
      },
      {
          "Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
          "Effect": "Deny",
          "Principal": "*",
          "Action": "s3:*",
          "Resource": "arn:aws:s3:::foundwaves/*",
          "Condition": {
              "StringNotLike": {
                  "aws:Referer": [
                      "http://www.[mysite].com/*",
                      "http://192.168.1.6/*",
                      "http://foundwaves.com/*",
                      "http://[ip]/*",
                      "http://localhost/*"
                  ]
              }
          }
      }
  ]
  </code></pre>
  
  <p>}</p>