Skip to content

Commit

Permalink
chore: set cdn.dynamic to true by default in caddy (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacquesDurand authored Feb 15, 2023
1 parent c0690a6 commit bd0c436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ surrogate_keys:
The_Fourth_Test:
```
| Key | Description | Value example |
| Key | Description | Value example |
|:--------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|
| `api` | The cache-handler API cache management | |
| `api.basepath` | BasePath for all APIs to avoid conflicts | `/your-non-conflicting-route`<br/><br/>`(default: /souin-api)` |
Expand All @@ -170,7 +170,7 @@ surrogate_keys:
| `cdn` | The CDN management, if you use any cdn to proxy your requests Souin will handle that | |
| `cdn.provider` | The provider placed before Souin | `akamai`<br/><br/>`fastly`<br/><br/>`souin` |
| `cdn.api_key` | The api key used to access to the provider | `XXXX` |
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `true`<br/><br/>`(default: false)` |
| `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 |
| `cdn.email` | The api key used to access to the provider if required, depending the provider | `XXXX` |
| `cdn.hostname` | The hostname if required, depending the provider | `domain.com` |
| `cdn.network` | The network if required, depending the provider | `your_network` |
Expand Down
2 changes: 1 addition & 1 deletion plugins/caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ What does these directives mean?
| `cdn` | The CDN management, if you use any cdn to proxy your requests Souin will handle that | |
| `cdn.provider` | The provider placed before Souin | `akamai`<br/><br/>`fastly`<br/><br/>`souin` |
| `cdn.api_key` | The api key used to access to the provider | `XXXX` |
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `(default: false)` |
| `cdn.dynamic` | Enable the dynamic keys returned by your backend application | `(default: true)` |
| `cdn.email` | The api key used to access to the provider if required, depending the provider | `XXXX` |
| `cdn.hostname` | The hostname if required, depending the provider | `domain.com` |
| `cdn.network` | The network if required, depending the provider | `your_network` |
Expand Down
1 change: 1 addition & 0 deletions plugins/caddy/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func parseConfiguration(cfg *Configuration, h *caddyfile.Dispenser, isBlocking b
cfg.DefaultCache.CacheName = args[0]
case "cdn":
cdn := configurationtypes.CDN{}
cdn.Dynamic = true
for nesting := h.Nesting(); h.NextBlock(nesting); {
directive := h.Val()
switch directive {
Expand Down

0 comments on commit bd0c436

Please sign in to comment.