Skip to content

Varnish Docker image that also caches POST requests

License

Notifications You must be signed in to change notification settings

zazuko/varnish-post

Folders and files

NameName
Last commit message
Last commit date
Apr 23, 2024
Apr 23, 2024
Feb 3, 2022
Apr 23, 2024
Apr 23, 2024
Jun 16, 2021
Apr 23, 2024
Apr 23, 2024
Apr 23, 2024
Apr 23, 2024
Feb 3, 2022
Feb 3, 2022
Apr 23, 2024
Apr 23, 2024

Repository files navigation

Varnish POST

This Docker image let you cache GET and POST requests.

For POST requests, it will not cache requests with no body or with an empty body.

Docker image

You can pull the Docker image using:

docker pull ghcr.io/zazuko/varnish-post

It is listening on the 80 port.

Configuration

You can use following environment variables for configuration:

  • BACKEND_HOST: host of the backend to cache (default: localhost)
  • BACKEND_PORT: port of the backend to cache (default: 3000)
  • BACKEND_FIRST_BYTE_TIMEOUT: first byte timeout (default: 60s)
  • CACHE_TTL: time to cache the request (default: 3600s)
  • BODY_SIZE: maximum size for the body ; if it exceeds this value, it will not be cached (default: 2048KB)
  • DISABLE_ERROR_CACHING: disable the caching of errors (default: true)
  • DISABLE_ERROR_CACHING_TTL: time where requests should be directly sent to the backend after an error occured (default: 30s)
  • CONFIG_FILE: the name of the configuration file to use (default: default.vcl)