Skip to content

Commit fcfa0c3

Browse files
authored
Branch was updated using the 'autoupdate branch' Actions workflow.
2 parents 0738254 + 42b5a90 commit fcfa0c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

middleware/set-fastly-cache-headers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ const FASTLY_TTL = process.env.FASTLY_TTL || String(60 * 60 * 24) // 24 hours
22
const STALE_TTL = String(60 * 10) // 10 minutes
33

44
const BYPASS_FASTLY = process.env.TEST_BYPASS_FASTLY === 'true'
5-
const BYPASS_PRODUCTS = /^\/([a-z]{2})\/([a-z0-9._-]+@[a-z0-9._-]+\/)?(discussions|packages|actions)(\/.*|$)/i
5+
const BYPASS_PRODUCTS = /^\/([a-z]{2})\/([a-z0-9._-]+@[a-z0-9._-]+\/)?github(\/.*|$)/i
66

77
module.exports = (req, res, next) => {
88
// Test bypassing Fastly for all pages inside of the Discussions product
9-
if (BYPASS_FASTLY && BYPASS_PRODUCTS.test(req.originalUrl)) {
9+
if (BYPASS_FASTLY && !BYPASS_PRODUCTS.test(req.originalUrl)) {
1010
res.set({
1111
'surrogate-control': 'private, no-store',
1212
'cache-control': 'private, no-store'

0 commit comments

Comments
 (0)