Skip to content

Commit df3d36a

Browse files
committed
style(docs): formatting
1 parent aa7d9c3 commit df3d36a

File tree

4 files changed

+77
-83
lines changed

4 files changed

+77
-83
lines changed

docs/pages/cdn-usage.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ The most important configuration is the [`Cache-Control`](https://developer.mozi
66

77
```php
88
/*
9-
|--------------------------------------------------------------------------
10-
| Response Headers
11-
|--------------------------------------------------------------------------
12-
|
13-
| Below you may configure the response headers which are added to the
14-
| response. This is especially useful for controlling caching behavior
15-
| of CDNs.
16-
|
17-
*/
18-
19-
'headers' => [
20-
'Cache-Control' => env('IMAGE_TRANSFORM_HEADER_CACHE_CONTROL', 'immutable, public, max-age=2592000, s-maxage=2592000'),
21-
// more headers can be added here
22-
],
9+
|--------------------------------------------------------------------------
10+
| Response Headers
11+
|--------------------------------------------------------------------------
12+
|
13+
| Below you may configure the response headers which are added to the
14+
| response. This is especially useful for controlling caching behavior
15+
| of CDNs.
16+
|
17+
*/
18+
'headers' => [
19+
'Cache-Control' => env('IMAGE_TRANSFORM_HEADER_CACHE_CONTROL', 'immutable, public, max-age=2592000, s-maxage=2592000'),
20+
// more headers can be added here
21+
],
2322
```

docs/pages/configuring-options.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ This package supports a variety of options, but you may not need or want to use
44

55
```php
66
/*
7-
|--------------------------------------------------------------------------
8-
| Enabled Options
9-
|--------------------------------------------------------------------------
10-
|
11-
| Here you may configure the options which are enabled for the image
12-
| transformer.
13-
|
14-
*/
7+
|--------------------------------------------------------------------------
8+
| Enabled Options
9+
|--------------------------------------------------------------------------
10+
|
11+
| Here you may configure the options which are enabled for the image
12+
| transformer.
13+
|
14+
*/
1515

16-
'enabled_options' => env('IMAGE_TRANSFORM_ENABLED_OPTIONS', [
17-
'width',
18-
'height',
19-
'format',
20-
'quality',
21-
// 'flip',
22-
// 'contrast',
23-
// 'version',
24-
// 'background',
25-
// 'blur'
26-
]),
16+
'enabled_options' => env('IMAGE_TRANSFORM_ENABLED_OPTIONS', [
17+
'width',
18+
'height',
19+
'format',
20+
'quality',
21+
// 'flip',
22+
// 'contrast',
23+
// 'version',
24+
// 'background',
25+
// 'blur'
26+
]),
2727
```

docs/pages/rate-limiting.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@ By default, rate limiting is disabled for the `local` and `testing` app environe
88

99
```php
1010
/*
11-
|--------------------------------------------------------------------------
12-
| Rate Limit
13-
|--------------------------------------------------------------------------
14-
|
15-
| Below you may configure the rate limit which is applied for each image
16-
| new transformation by the path and IP address. It is recommended to
17-
| set this to a low value, e.g. 2 requests per minute, to prevent
18-
| abuse.
19-
*/
20-
21-
'rate_limit' => [
22-
'enabled' => env('IMAGE_TRANSFORM_RATE_LIMIT_ENABLED', true),
23-
'disabled_for_environments' => [
24-
'local',
25-
'testing',
26-
],
27-
'max_attempts' => env('IMAGE_TRANSFORM_RATE_LIMIT_MAX_REQUESTS', 2),
28-
'decay_seconds' => env('IMAGE_TRANSFORM_RATE_LIMIT_DECAY_SECONDS', 60),
11+
|--------------------------------------------------------------------------
12+
| Rate Limit
13+
|--------------------------------------------------------------------------
14+
|
15+
| Below you may configure the rate limit which is applied for each image
16+
| new transformation by the path and IP address. It is recommended to
17+
| set this to a low value, e.g. 2 requests per minute, to prevent
18+
| abuse.
19+
*/
20+
'rate_limit' => [
21+
'enabled' => env('IMAGE_TRANSFORM_RATE_LIMIT_ENABLED', true),
22+
'disabled_for_environments' => [
23+
'local',
24+
'testing',
2925
],
26+
'max_attempts' => env('IMAGE_TRANSFORM_RATE_LIMIT_MAX_REQUESTS', 2),
27+
'decay_seconds' => env('IMAGE_TRANSFORM_RATE_LIMIT_DECAY_SECONDS', 60),
28+
],
3029
```

docs/pages/setup.md

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,32 @@ An example source directory configuration might look like this:
1111

1212
```php
1313
/*
14-
|--------------------------------------------------------------------------
15-
| Source Directories
16-
|--------------------------------------------------------------------------
17-
|
18-
| Here you may configure the directories from which the image transformer
19-
| is allowed to serve images. For security reasons, it is recommended
20-
| to only allow directories which are already publicly accessible.
21-
|
22-
| Important: The public storage directory should be addressed directly via
23-
| storage('app/public') instead of the public_path('storage') link.
24-
|
25-
*/
26-
27-
'source_directories' => [
28-
'images' => public_path('images'),
29-
'storage' => storage_path('app/public/images'),
30-
],
31-
32-
/*
33-
|--------------------------------------------------------------------------
34-
| Default Source Directory
35-
|--------------------------------------------------------------------------
36-
|
37-
| Below you may configure the default source directory which is used when
38-
| no specific path prefix is provided in the URL. This should be one of
39-
| the keys from the source_directories array.
40-
|
41-
*/
42-
43-
'default_source_directory' => env('IMAGE_TRANSFORM_DEFAULT_SOURCE_DIRECTORY', 'images'),
44-
45-
// ...
14+
|--------------------------------------------------------------------------
15+
| Source Directories
16+
|--------------------------------------------------------------------------
17+
|
18+
| Here you may configure the directories from which the image transformer
19+
| is allowed to serve images. For security reasons, it is recommended
20+
| to only allow directories which are already publicly accessible.
21+
|
22+
| Important: The public storage directory should be addressed directly via
23+
| storage('app/public') instead of the public_path('storage') link.
24+
|
25+
*/
26+
'source_directories' => [
27+
'images' => public_path('images'),
28+
'storage' => storage_path('app/public/images'),
29+
],
30+
/*
31+
|--------------------------------------------------------------------------
32+
| Default Source Directory
33+
|--------------------------------------------------------------------------
34+
|
35+
| Below you may configure the default source directory which is used when
36+
| no specific path prefix is provided in the URL. This should be one of
37+
| the keys from the source_directories array.
38+
|
39+
*/
40+
'default_source_directory' => env('IMAGE_TRANSFORM_DEFAULT_SOURCE_DIRECTORY', 'images'),
41+
// ...
4642
```

0 commit comments

Comments
 (0)