From d483f4a01fd3d12f0d991fafce01a7cb39d0ee40 Mon Sep 17 00:00:00 2001 From: Mike Barnes Date: Mon, 5 Nov 2018 17:01:22 +1100 Subject: [PATCH] Expose S3 endpoint setting via config file To use non-AWS services like Google Cloud Storage or a custom provider via S3 compatibility, the endpoint needs to be configurable, and separated from the URL to allow Cloudflare etc proxy for SSL termination. eg for GCS in S3 mode with custom domain: AWS_ENDPOINT="https://storage.googleapis.com" AWS_URL="https://i.pitchfork.club" This is already supported via the driver, it just needs a config option to feed it in. https://laracasts.com/discuss/channels/laravel/custom-file-driver-digital-ocean-spaces?page=1 --- config/filesystems.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/filesystems.php b/config/filesystems.php index ab75dc28b..cc6157b23 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -56,12 +56,13 @@ return [ ], 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION'), - 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), + 'driver' => 's3', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), + 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), ], ],