Skip to content

Commit 8f3e3cd

Browse files
committed
Remove required attributes
1 parent 8f30f60 commit 8f3e3cd

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release Notes for Blitz CloudFront Purger
22

3+
## 5.1.1 - 2024-10-18
4+
5+
### Fixed
6+
7+
- Fixed the ability to leave the API key and secret empty ([#13](https://github.com/putyourlightson/craft-blitz-cloudfront/issues/13)).
8+
39
## 5.1.0 - 2024-06-25
410

511
### Changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "putyourlightson/craft-blitz-cloudfront",
33
"description": "CloudFront cache purger for the Blitz plugin.",
4-
"version": "5.1.0",
4+
"version": "5.1.1",
55
"type": "craft-plugin",
66
"homepage": "https://putyourlightson.com/plugins/blitz",
77
"license": "proprietary",

src/CloudFrontPurger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function attributeLabels(): array
113113
public function rules(): array
114114
{
115115
return [
116-
[['apiKey', 'apiSecret', 'distributionId'], 'required'],
116+
[['distributionId'], 'required'],
117117
];
118118
}
119119

src/templates/settings.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
label: 'API Key'|t('blitz-cloudfront'),
55
id: 'apiKey',
66
name: 'apiKey',
7-
instructions: 'An API key for your AWS account.'|t('blitz-cloudfront'),
7+
instructions: 'An API key for your AWS account. You can leave this field empty if you are using an EC2 instance with an applicable IAM role assignment.'|t('blitz-cloudfront'),
88
suggestEnvVars: true,
99
suggestions: craft.cp.getEnvSuggestions(),
1010
value: purger.apiKey,
@@ -17,7 +17,7 @@
1717
label: 'API Secret'|t('blitz-cloudfront'),
1818
id: 'apiSecret',
1919
name: 'apiSecret',
20-
instructions: 'An API secret for your AWS account.'|t('blitz-cloudfront'),
20+
instructions: 'An API secret for your AWS account. You can leave this field empty if you are using an EC2 instance with an applicable IAM role assignment.'|t('blitz-cloudfront'),
2121
suggestEnvVars: true,
2222
suggestions: craft.cp.getEnvSuggestions(),
2323
value: purger.apiSecret,

0 commit comments

Comments
 (0)