-
Notifications
You must be signed in to change notification settings - Fork 5
Update configurations to work with Cloudflare as our CDN [WEB-3107, WEB-3108] #825
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
base: develop
Are you sure you want to change the base?
Conversation
Automated PR SummaryThis PR integrates support for the Cloudflare CDN into an existing project that previously only supported AWS CloudFront. It refactors CDN-related components to be more generic, facilitating operations with either CloudFront or Cloudflare based on configuration settings. The PR introduces new commands for CDN IP updates and cache invalidation, updates existing commands and middleware for these operations, and adjusts configurations and environmental settings to accommodate these changes. Potential bugs
|
6b3d139
to
49a8c08
Compare
49a8c08
to
332f5df
Compare
Here's the code health analysis summary for commits Analysis Summary
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just left a couple FYIs
]); | ||
|
||
$contents = curl_exec($ch); | ||
curl_close($ch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be changed, but just FYI, file_get_contents
can also be passed header options:
https://www.php.net/manual/en/function.file-get-contents.php#example-2353
But personally, I think that Guzzle has a more readable interface than either of these options.
@@ -49,4 +49,10 @@ | |||
'id' => env('GTM_ID', '') | |||
], | |||
|
|||
'cloudflare' => [ | |||
'enabled' => (bool) env('CLOUDFLARE_ENABLED', false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the value in the .env
to CLOUDFLARE_ENABLED=true
or CLOUDFLARE_ENABLED=(true)
should convert the value returned by env()
to a boolean without the need to explicitly cast it:
https://laravel.com/docs/11.x/configuration#environment-variable-types
No description provided.