igovnow
6b55736018
This VCL (Varnish Configuration Language) file defines caching and request handling rules for a Varnish cache server. Here's a description of its main components and functionality: Backend Definition: Sets the default backend to a service named "ghost" on port 2368. Request Handling (vcl_recv): Normalizes the host header by redirecting www subdomain requests. Excludes the Ghost admin panel and API from caching. Synthetic Responses (vcl_synth): Implements a custom redirect for www subdomain to the main domain. Backend Response Handling (vcl_backend_response): Sets a default cache time of 1 hour for all responses. Prevents caching of responses with Set-Cookie headers, varying wildcard, or private Cache-Control directives. Response Delivery (vcl_deliver): Adds a custom X-Cache header to indicate cache hits or misses. This configuration aims to improve website performance by caching Ghost blog content while ensuring that dynamic and private content (like the admin panel) is not cached. It also handles www subdomain redirection and provides cache status information in the response headers. |
||
---|---|---|
.. | ||
default.vcl |