Skip to content

Commit 26b0c80

Browse files
author
Abhishek Garg
committed
Revert "fix(aso-overlay): add Surrogate-Key header so Fastly purge actually invalidates (SITES-48140)"
This reverts commit 863c0dd.
1 parent 863c0dd commit 26b0c80

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

src/controllers/redirects.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,6 @@ function RedirectsController(ctx) {
272272
'content-type': 'text/plain; charset=utf-8',
273273
...(etag ? { etag } : {}),
274274
'cache-control': OVERLAY_CACHE_CONTROL,
275-
// Same Surrogate-Key as the 200 so any 304 stragglers still on the
276-
// old TTL can be purged by the same call. Fastly stores the header
277-
// for edge state; RFC 7232 requires we carry cache-control + etag,
278-
// and Surrogate-Key is an operationally-linked companion.
279-
'surrogate-key': `aso-overlay-${service}`,
280275
});
281276
}
282277

@@ -291,12 +286,6 @@ function RedirectsController(ctx) {
291286
'cache-control': OVERLAY_CACHE_CONTROL,
292287
// Include ETag so a subsequent poll can conditionally revalidate.
293288
...(etag ? { etag } : {}),
294-
// Fastly surrogate key so Mystique can targeted-purge this tenant's
295-
// overlay on Deploy (see mystique#3381). Namespaced with `aso-overlay-`
296-
// prefix so future overlays under different routes don't collide with
297-
// this key space. Fastly VCL strips the /config/<tier>/ prefix before
298-
// reaching origin, so we only need per-service uniqueness (not per-tier).
299-
'surrogate-key': `aso-overlay-${service}`,
300289
});
301290
} catch (err) {
302291
const code = err.$metadata?.httpStatusCode;

test/controllers/redirects.test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ describe('RedirectsController', () => {
9898
expect(response.headers.get('content-type')).to.equal('text/plain; charset=utf-8');
9999
expect(response.headers.get('cache-control')).to.equal('max-age=10');
100100
expect(response.headers.get('etag')).to.equal(ETAG);
101-
// Surrogate-Key enables Mystique to targeted-purge this tenant's overlay
102-
// via Fastly's key-purge endpoint (POST /service/<sid>/purge/<key>) after
103-
// a successful S3 write. See mystique#3381.
104-
expect(response.headers.get('surrogate-key')).to.equal(`aso-overlay-${SERVICE}`);
105101
expect(await response.text()).to.equal(overlay);
106102
// Resolves the site by the p<program>/e<env> external ids parsed from the service.
107103
expect(mockDataAccess.Site.findByExternalOwnerIdAndExternalSiteId
@@ -158,8 +154,6 @@ describe('RedirectsController', () => {
158154
expect(response.headers.get('etag')).to.equal(ETAG);
159155
expect(response.headers.get('cache-control')).to.equal('max-age=10');
160156
expect(response.headers.get('content-type')).to.equal('text/plain; charset=utf-8');
161-
// Surrogate-Key echoed on 304 so purges hit both HIT and NOT_MODIFIED entries.
162-
expect(response.headers.get('surrogate-key')).to.equal(`aso-overlay-${SERVICE}`);
163157
expect(await response.text()).to.equal('');
164158
// Body never deserialized when returning 304 — the transformToString cost is elided.
165159
expect(bodyStub.called).to.be.false;

0 commit comments

Comments
 (0)