Skip to content

Commit

Permalink
fix(typo): allowed_additional_status_codes
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweak committed Nov 15, 2024
1 parent dec0714 commit 7fe5f43
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ default_cache:
- GET
- POST
- HEAD
allowed_addional_status_code: # Allowed additional HTTP status code to cache.
allowed_additional_status_codes: # Allowed additional HTTP status code to cache.
- 202
- 400
cache_name: Souin # Override the cache name to use in the Cache-Status header
Expand Down Expand Up @@ -199,7 +199,7 @@ surrogate_keys:
| `cdn.service_id` | The service id if required, depending the provider | `123456_id` |
| `cdn.zone_id` | The zone id if required, depending the provider | `anywhere_zone` |
| `default_cache.allowed_http_verbs` | The HTTP verbs to support cache | `- GET`<br/><br/>`- POST`<br/><br/>`(default: GET, HEAD)` |
| `default_cache.allowed_addional_status_code` | The additional HTTP status code to support cache | `- 200`<br/><br/>`- 404` |
| `default_cache.allowed_additional_status_codes` | The additional HTTP status code to support cache | `- 200`<br/><br/>`- 404` |
| `default_cache.badger` | Configure the Badger cache storage | |
| `default_cache.badger.path` | Configure Badger with a file | `/anywhere/badger_configuration.json` |
| `default_cache.badger.configuration` | Configure Badger directly in the Caddyfile or your JSON caddy configuration | [See the Badger configuration for the options](https://dgraph.io/docs/badger/get-started/) |
Expand Down Expand Up @@ -429,7 +429,7 @@ There is the fully configuration below
}
cache {
allowed_http_verbs GET POST PATCH
allowed_addional_status_code 202
allowed_additional_status_codes 202
api {
basepath /some-basepath
prometheus {
Expand Down Expand Up @@ -887,7 +887,7 @@ http:
- GET
- POST
- HEAD
allowed_addional_status_code:
allowed_additional_status_codes:
- 202
- 400
cdn:
Expand Down Expand Up @@ -987,7 +987,7 @@ http:
- GET
- HEAD
- POST
allowed_addional_status_code:
allowed_additional_status_codes:
- 202
- 400
default_cache_control: no-store
Expand Down
2 changes: 1 addition & 1 deletion configuration/configuration.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default_cache: # Required part
- GET
- POST
- HEAD
allowed_addional_status_code: # Allowed additional HTTP status code to cache.
allowed_additional_status_codes: # Allowed additional HTTP status code to cache.
- 202
- 400
cache_name: Souin # Override the Cache-Status name
Expand Down
2 changes: 1 addition & 1 deletion docs/website/content/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ The allowed_http_verbs prefix configure the HTTP verbs allowed to get cached. (e
default: `[GET, HEAD]`

#### Allowed additional status code
The allowed_addional_status_code prefix configure the additional HTTP status codes allowed to get cached. (e.g. `default_cache.allowed_addional_status_code`).
The allowed_additional_status_codes prefix configure the additional HTTP status codes allowed to get cached. (e.g. `default_cache.allowed_additional_status_codes`).
default: `[]`

#### Badger
Expand Down
2 changes: 1 addition & 1 deletion plugins/caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ What does these directives mean?
| Key | Description | Value example |
|:------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| `allowed_http_verbs` | The HTTP verbs allowed to be cached | `GET POST PATCH`<br/><br/>`(default: GET HEAD)` |
| `allowed_addional_status_code` | The additional HTTP status codes allowed to be cached | `202 400` |
| `allowed_additional_status_codes` | The additional HTTP status codes allowed to be cached | `202 400` |
| `api` | The cache-handler API cache management | |
| `api.basepath` | BasePath for all APIs to avoid conflicts | `/your-non-conflict-route`<br/><br/>`(default: /souin-api)` |
| `api.prometheus` | Enable the Prometheus metrics | |
Expand Down
2 changes: 1 addition & 1 deletion plugins/caddy/httpcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type SouinCaddyMiddleware struct {
// Allowed HTTP verbs to be cached by the system.
AllowedHTTPVerbs []string `json:"allowed_http_verbs,omitempty"`
// Allowed HTTP verbs to be cached by the system.
AllowedAdditionalStatusCodes []string `json:"allowed_addional_status_code,omitempty"`
AllowedAdditionalStatusCodes []string `json:"allowed_additional_status_codes,omitempty"`
// Headers to add to the cache key if they are present.
Headers []string `json:"headers,omitempty"`
// Configure the Badger cache storage.
Expand Down
2 changes: 1 addition & 1 deletion plugins/kratos/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ httpcache:
- GET
- POST
- HEAD
allowed_addional_status_code:
allowed_additional_status_codes:
- 202
- 400
badger:
Expand Down
2 changes: 1 addition & 1 deletion plugins/roadrunner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ http:
- GET
- POST
- HEAD
allowed_addional_status_code: # Allowed additional HTTP status codes to cache.
allowed_additional_status_codes: # Allowed additional HTTP status codes to cache.
- 202
- 400
cache_name: Souin # Override the cache name to use in the Cache-Status header
Expand Down

0 comments on commit 7fe5f43

Please sign in to comment.