feat: Implement Secure R2 Storage with Private Bucket and Proxy Controller

This commit is contained in:
dyzulk
2026-01-04 18:07:22 +07:00
parent b4ea949bf2
commit 4dc4b3d498
5 changed files with 102 additions and 7 deletions

View File

@@ -60,7 +60,34 @@ return [
'report' => false,
],
'r2' => [
'r2-public' => [
'driver' => 's3',
'key' => env('R2_ACCESS_KEY_ID'),
'secret' => env('R2_SECRET_ACCESS_KEY'),
'region' => 'auto',
'bucket' => env('R2_BUCKET'),
'url' => env('R2_URL'),
'endpoint' => env('R2_ENDPOINT'),
'use_path_style_endpoint' => env('R2_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'report' => false,
],
'r2-private' => [
'driver' => 's3',
'key' => env('R2_ACCESS_KEY_ID'),
'secret' => env('R2_SECRET_ACCESS_KEY'),
'region' => 'auto',
'bucket' => env('R2_PRIVATE_BUCKET'),
'endpoint' => env('R2_ENDPOINT'),
'use_path_style_endpoint' => env('R2_USE_PATH_STYLE_ENDPOINT', false),
'visibility' => 'private',
'throw' => false,
'report' => false,
],
'r2' => [ // Legacy alias pointing to r2-public
'driver' => 's3',
'key' => env('R2_ACCESS_KEY_ID'),
'secret' => env('R2_SECRET_ACCESS_KEY'),