aspirecloud-plugin/includes/views/index.php
Namith Jawahar 3ac559642a API Passthrough
Convert the site into a headless instance, attach the REST API at the root of the site and pass through all requests to the end point defines as source API.
2025-07-18 02:07:56 +05:30

25 lines
508 B
PHP

<?php
/**
* Default template for headless WordPress.
* This should rarely be used as most requests are handled by the API passthrough.
*
* @package aspire-cloud
*/
// Prevent direct access
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Set JSON header
header( 'Content-Type: application/json' );
// Return a simple JSON response indicating this is a headless WordPress
echo wp_json_encode(
[
'message' => 'WordPress Core Services API',
'version' => AC_VERSION,
'status' => 'active',
]
);
exit;