Skip to content

Commit add1885

Browse files
committed
fix(README.md): Added explanation in README for POST requests to purge paths or tags
1 parent 987b2cc commit add1885

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ To run the project, use the following command:
6666
go run cmd/main.go
6767
```
6868

69+
For purging content, the application provides a POST endpoint at `/api/v1/purge`. The request body should include the following fields:
70+
```json
71+
{
72+
"purgeType": "urls", // "urls" or "cache-tags"
73+
"actionType": "invalidate", // "invalidate" or "delete"
74+
"environment": "production", // "production" or "staging"
75+
"paths": [ // List of paths to purge or cache tags to delete (depending on the purgeType)
76+
"/path1",
77+
"/path2"
78+
]
79+
}
80+
```
6981
## Logging
7082
The project includes extensive logging capabilities. The logs can be configured in the config.yaml file under the logs section. Example log fields:
7183
* REQUEST:method: HTTP method of the request.

0 commit comments

Comments
 (0)