1.0.7 • Published 2 years ago

@dnj/iso.jeyserver.com v1.0.7

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

s3-autoindex

Static website to generate directory listing for S3 buckets.

Example directory listing generated by s3-autoindex

Usage

Clone the repository and edit config.js, configuring it with your bucket.

  • Set window.S3_BUCKET_URL to bucket's REST endpoint.
  • Alternatively, set window.SECRET_BUCKET_URL to your AES-encrypted REST endpoint. Doing so will obfuscate your public S3 url and password protect your directory listing. An encrypt function is available in js/encryption.js for generating encrypted URLs.

Note: The S3 REST endpoint used differs from S3's website endpoint. For more details, see: Website Rest EndpointDiff.

S3 Bucket Permissions

You must setup the S3 website bucket to allow public read access.

  • Grant Everyone the List and View permissions: npm.io

  • Assign the following Bucket Policy:

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::{your-bucket-name}/*"
        }
    ]
}
  • Assign the following CORS Configuration:
<CORSConfiguration>
 <CORSRule>
   <AllowedOrigin>*</AllowedOrigin>
   <AllowedMethod>GET</AllowedMethod>
   <AllowedHeader>*</AllowedHeader>
 </CORSRule>
</CORSConfiguration>
1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago