Skip to content

Commit bd0c436

Browse files
chore: set cdn.dynamic to true by default in caddy (#307)
1 parent c0690a6 commit bd0c436

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ surrogate_keys:
151151
The_Fourth_Test:
152152
```
153153
154-
| Key | Description | Value example |
154+
| Key | Description | Value example |
155155
|:--------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
156156
| `api` | The cache-handler API cache management | |
157157
| `api.basepath` | BasePath for all APIs to avoid conflicts | `/your-non-conflicting-route`<br/><br/>`(default: /souin-api)` |
@@ -170,7 +170,7 @@ surrogate_keys:
170170
| `cdn` | The CDN management, if you use any cdn to proxy your requests Souin will handle that | |
171171
| `cdn.provider` | The provider placed before Souin | `akamai`<br/><br/>`fastly`<br/><br/>`souin` |
172172
| `cdn.api_key` | The api key used to access to the provider | `XXXX` |
173-
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `true`<br/><br/>`(default: false)` |
173+
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `true`<br/><br/>`(default: false)`<br/><br/>`(default: true)` in the Caddy plugin if `cdn` is provided |
174174
| `cdn.email` | The api key used to access to the provider if required, depending the provider | `XXXX` |
175175
| `cdn.hostname` | The hostname if required, depending the provider | `domain.com` |
176176
| `cdn.network` | The network if required, depending the provider | `your_network` |

plugins/caddy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ What does these directives mean?
366366
| `cdn` | The CDN management, if you use any cdn to proxy your requests Souin will handle that | |
367367
| `cdn.provider` | The provider placed before Souin | `akamai`<br/><br/>`fastly`<br/><br/>`souin` |
368368
| `cdn.api_key` | The api key used to access to the provider | `XXXX` |
369-
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `(default: false)` |
369+
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `(default: true)` |
370370
| `cdn.email` | The api key used to access to the provider if required, depending the provider | `XXXX` |
371371
| `cdn.hostname` | The hostname if required, depending the provider | `domain.com` |
372372
| `cdn.network` | The network if required, depending the provider | `your_network` |

plugins/caddy/configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ func parseConfiguration(cfg *Configuration, h *caddyfile.Dispenser, isBlocking b
344344
cfg.DefaultCache.CacheName = args[0]
345345
case "cdn":
346346
cdn := configurationtypes.CDN{}
347+
cdn.Dynamic = true
347348
for nesting := h.Nesting(); h.NextBlock(nesting); {
348349
directive := h.Val()
349350
switch directive {

0 commit comments

Comments
 (0)