File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ export async function run(req: Request, ctx: Helix.UniversalContext): Promise<Re
4545
4646 let devsitePaths ;
4747 let devsitePathsUrl ;
48+
49+ let localMode = false ;
50+ // check to see if we're in local devmode or if content is coming from github
51+ if ( origin === 'http://127.0.0.1:3003' ) {
52+ log . debug ( ' Local mode detected' ) ;
53+ localMode = true ;
54+ }
55+
4856 // retrieve the devsitepaths.json file based on if authorization is present
4957 if ( req . headers . get ( 'authorization' ) ) {
5058 devsitePathsUrl = `https://main--adp-devsite-stage--adobedocs.aem.live/franklin_assets/devsitepaths.json` ;
@@ -154,11 +162,8 @@ export async function run(req: Request, ctx: Helix.UniversalContext): Promise<Re
154162 }
155163
156164 let contentUrl ;
157- let localMode = false ;
158165 // check to see if we're in local devmode or if content is coming from github
159- if ( origin === 'http://127.0.0.1:3003' ) {
160- log . debug ( ' Local mode detected' ) ;
161- localMode = true ;
166+ if ( localMode ) {
162167 let flatPath = path . replace ( '/src/pages' , '' ) ;
163168 contentUrl = `${ origin } ${ flatPath } ` ;
164169 } else {
You can’t perform that action at this time.
0 commit comments