mxHeadless
REST API gateway for headless frontends on MODX 3. Resources, objects, OpenAPI, API keys, and OAuth

Default gateway prefix is /api (mxheadless_api_prefix). Requests to /api/v1/* must reach MODX index.php, where the OnHandleRequest plugin intercepts the API.
Enable mod_rewrite. MODX friendly URLs already route unknown paths to index.php. You usually do not need a separate rewrite block for /api.
location / {
try_files $uri $uri/ /index.php?$args;
}The path /api/v1/* must not be served as static files and must not bypass PHP.
Without rewrite, use assets/components/mxheadless/api.php.
.../api.php/v1/health.../api.php?route=/v1/healthBare api.php serves discovery. See Installation.
Behind a load balancer, set mxheadless_trusted_proxies or rate limit and audit will see the proxy IP. The package does not rewrite URL scheme from X-Forwarded-Proto. Configure HTTPS on the web server or reverse proxy.