File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,19 @@ module.exports = class OriginRequestInterface {
9898 return res ;
9999 }
100100 createNext ( ) {
101+ // this flow will be called for prerender.cloud LAST_RESORT_TIMEOUT
102+ // aka "prerendercloud middleware SKIPPED: server error: Request timed out"
103+ // it will merely fall back to non-prerendered content
101104 return ( ) => {
102105 delete this . cloudFrontRequest . headers [ util . USER_AGENT_PLACEHOLDER ] ;
103- this . cloudFrontRequest . uri = this . originalUri ;
104106
107+ if ( this . originalUri === "/" ) {
108+ this . cloudFrontRequest . uri = "/index.html" ;
109+ } else {
110+ this . cloudFrontRequest . uri = this . originalUri ;
111+ }
112+
113+ // console.log("OriginRequest calling next", this.cloudFrontRequest);
105114 this . callback ( null , this . cloudFrontRequest ) ;
106115 } ;
107116 }
You can’t perform that action at this time.
0 commit comments