File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
vtex/loaders/intelligentSearch Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import {
2121 getSegmentFromBag ,
2222 withSegmentCookie ,
2323} from "../../utils/segment.ts" ;
24- import { pageTypesFromUrl } from "../../utils/intelligentSearch.ts" ;
2524import { withIsSimilarTo } from "../../utils/similars.ts" ;
2625import { getSkipSimulationBehaviorFromBag } from "../../utils/simulationBehavior.ts" ;
2726import { slugify } from "../../utils/slugify.ts" ;
Original file line number Diff line number Diff line change @@ -159,7 +159,12 @@ export const loader = async (
159159) => {
160160 const url = new URL ( req . url ) ;
161161 const devMode = url . searchParams . has ( "__d" ) ;
162- const appMode = url . searchParams . has ( "__app" ) ;
162+ const appMode = url . searchParams . has ( "__app" ) || url . searchParams . has ( "asJson" ) ; ;
163+
164+ if ( appMode ) {
165+ ctx . response . headers . set ( 'Cache-Control' , 'max-age=3500, public' )
166+ } ;
167+
163168 const unindexedDomain = noIndexedDomains . some ( ( domain ) =>
164169 url . origin . includes ( domain )
165170 ) ;
You can’t perform that action at this time.
0 commit comments