We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0738254 + 42b5a90 commit fcfa0c3Copy full SHA for fcfa0c3
1 file changed
middleware/set-fastly-cache-headers.js
@@ -2,11 +2,11 @@ const FASTLY_TTL = process.env.FASTLY_TTL || String(60 * 60 * 24) // 24 hours
2
const STALE_TTL = String(60 * 10) // 10 minutes
3
4
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
+const BYPASS_PRODUCTS = /^\/([a-z]{2})\/([a-z0-9._-]+@[a-z0-9._-]+\/)?github(\/.*|$)/i
6
7
module.exports = (req, res, next) => {
8
// Test bypassing Fastly for all pages inside of the Discussions product
9
- if (BYPASS_FASTLY && BYPASS_PRODUCTS.test(req.originalUrl)) {
+ if (BYPASS_FASTLY && !BYPASS_PRODUCTS.test(req.originalUrl)) {
10
res.set({
11
'surrogate-control': 'private, no-store',
12
'cache-control': 'private, no-store'
0 commit comments