Don't overwrite Surrogate-control header

Created on 13 February 2018, almost 7 years ago
Updated 12 July 2023, over 1 year ago

We want to include stale-while-revalidate and stale-if-error directives in the Surrogate-control header, but Fastly throws them away if we add them via the Metatags module.

This module uses drupal_add_http_header() to set a Surrogate-control header in the fastly_init() function of fastly.module. It neglects to use the append flag so it will inadvertently overwrite any existing Surrogate-control header.

What would be ideal is if there's already a Surrogate-control header, the module would leave it alone. If there isn't one, it would set one.

Workaround: We are adding the Surrogate-control header we want in the template.php file.

πŸ› Bug report
Status

Closed: outdated

Version

2.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States margyly

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024