@@ -586,7 +586,7 @@ async function drainNextPublicationJob(env: RuntimeEnv, coordinator: RevisionCoo
586586 if ( progress . next < plan . upsert . length ) {
587587 const route = plan . upsert [ progress . next ]
588588 runtime = await bootRuntime ( env . WORDPRESS_STATE_BUCKET , job . canonical , SITE_URL , await canonicalWordPressAuthConstants ( env ) )
589- const compiled = await compilePublicationRoutes ( runtime , [ route ] , await runtimeSiteOrigin ( runtime ) )
589+ const compiled = await compilePublicationRoutes ( runtime , [ route ] , SITE_URL )
590590 const page = compiled [ 0 ]
591591 const objectKey = await publishedPageObjectKey ( job . canonical . revision , page . route )
592592 const snapshot : WordPressPageSnapshot = { schema : PUBLISHED_PAGE_SCHEMA , canonicalRevision : job . canonical . revision , route : page . route , status : page . status , statusText : page . statusText , headers : page . headers , body : page . body }
@@ -1091,12 +1091,6 @@ async function runNextCronEvent(runtime: Runtime): Promise<{ executed: false } |
10911091 return { executed : true , hook : event . hook , timestamp : event . timestamp ! , canonicalChanges : readCanonicalChanges ( runtime . php ) , publicationChanges : readPublicationChanges ( runtime . php ) }
10921092}
10931093
1094- async function runtimeSiteOrigin ( runtime : Runtime ) : Promise < string > {
1095- const output = ( await runtime . php . run ( { code : "<?php require '/wordpress/wp-load.php'; echo get_option('home');" } ) ) . text . trim ( )
1096- const url = new URL ( output )
1097- return url . origin
1098- }
1099-
11001094async function health ( runtime : Runtime ) : Promise < Response > {
11011095 const phpVersion = ( await runtime . php . run ( { code : "<?php echo PHP_VERSION;" } ) ) . text . trim ( )
11021096 return cloudflareRuntimeHealthResponse ( { schema : CLOUDFLARE_RUNTIME_HEALTH_SCHEMA , marker : CLOUDFLARE_RUNTIME_HEALTH_MARKER , wordpressVersion : runtime . wordpressVersion , phpVersion, runtime : { backend : "wordpress-playground" , environment : "wordpress" } , evidence : { initialization : "completed" , execution : "completed" , initializationScope : "isolate" } } )
0 commit comments