HomePhabricator

Use header_register_callback to avoid caching responses with Set-Cookie headers

Authored by Anomie on Mar 8 2016, 5:46 PM.

Description

Use header_register_callback to avoid caching responses with Set-Cookie headers

This change mirrors logic that has been in use on the Wikimedia
Foundation production cluster's Varnish cache system for over 2 years to
guard against accidentally caching backend responses which include
Set-Cookie headers.

Bug: T127993
Change-Id: Ic79cf6c959dd870d6458874a9bffe9e25aba4919