Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement s3ForcePathStyle with s3 aws #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ S3_BUCKET=your_bucket
# If you are using Amazon S3 then only set region.
# However if you are using some other provider then only set endpoint.
# Region and endpoint both should not be set together.
# If you want to to force path style URLs for S3 objects Set AWS_USE_PATH_STYLE_ENDPOINT as a true
# It will replace https://{service}.{region}.amazonaws.com to the endpoint

S3_REGION=your_region
# S3_ENDPOINT=your_endpoint
Expand All @@ -70,6 +72,7 @@ if (mix.inProduction()) {
bucket: process.env.S3_BUCKET,
region: process.env.S3_REGION,
// endpoint: process.env.S3_ENDPOINT,
// s3ForcePathStyle: process.env.AWS_USE_PATH_STYLE_ENDPOINT, //#(endpoint required)
prefix: 'assets',
acl: 'public-read',
cache: 'max-age=602430',
Expand Down
4 changes: 4 additions & 0 deletions webpack.s3.pusher.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ function S3PusherPlugin(options) {
config.endpoint = options.endpoint
}

if (options.s3ForcePathStyle) {
config.s3ForcePathStyle = options.s3ForcePathStyle
}

AWS.config.update(config)
}

Expand Down