File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ const FASTLY_TTL = process.env.FASTLY_TTL || String(60 * 60 * 24) // 24 hours
2
2
const STALE_TTL = String ( 60 * 10 ) // 10 minutes
3
3
4
4
const BYPASS_FASTLY = process . env . TEST_BYPASS_FASTLY === 'true'
5
- const BYPASS_PRODUCTS = / ^ \/ ( [ a - z ] { 2 } ) \/ ( [ a - z 0 - 9 . _ - ] + @ [ a - z 0 - 9 . _ - ] + \/ ) ? ( d i s c u s s i o n s | p a c k a g e s | a c t i o n s ) ( \/ .* | $ ) / i
5
+ const BYPASS_PRODUCTS = / ^ \/ ( [ a - z ] { 2 } ) \/ ( [ a - z 0 - 9 . _ - ] + @ [ a - z 0 - 9 . _ - ] + \/ ) ? g i t h u b ( \/ .* | $ ) / i
6
6
7
7
module . exports = ( req , res , next ) => {
8
8
// 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 ) ) {
10
10
res . set ( {
11
11
'surrogate-control' : 'private, no-store' ,
12
12
'cache-control' : 'private, no-store'
You can’t perform that action at this time.
0 commit comments