CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 1 of 14

corestack_nginx_rules_get

nginx rules.

Scope readNo secrets returned
On this page

When to use it

Read an environment row's custom nginx rules: the four hooks (server, headers, php, http) with whether each is available yet, the live status and the last error, the verify paths, the limits, the policy version, the read-only Corefinity rules and any staff lock. Every change needs the version this answers.

hooks.<hook>.content is the editor text (without the file's two banner lines); a hook that is not available yet carries available_after (not_scheduled, scheduled with its date, or in_progress). status.state is never, live, applying, pending_verify, rejected, rolled_back or verify_failed, with status.error (hook, file line, column, code, message) for the last rejection. drift is set when the repository's custom files differ from the saved rules (a change made outside the Control Panel): answer it with corestack_nginx_rules_drift_resolve (use the repository's rules, or keep the Control Panel's) with this version, or save again with corestack_nginx_rules_update. adoption says whether the one-time runtime update can be turned on now (can_adopt_now, adopt_now_refusal).

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_nginx_rules_get with site_id 4211. (nginx rules.) Tell me what it returned.

Inputs

include_renderedboolean

Also answer path_apps.rendered.

site_idintegerRequired

The environment row. At least 1.

Example call

tools/call
{
  "name": "corestack_nginx_rules_get",
  "arguments": {
    "site_id": 4211
  }
}

If it is refused

ReasonWhat to do
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

Path apps

The answer also carries path_apps: available (false while this environment's runtime cannot serve path apps yet; saving a changed list is then refused with path_apps_unavailable), items (the environment's path apps and gates, the whole list that corestack_nginx_rules_update takes back), presets (each {key, title, description, type, record}: the fields a preset pre-fills), hosts (the hosts a record may name), primary_host (the production host a gate on / may not cover), proxy_available (whether this environment's runtime takes the proxy type; a proxy is refused with path_app_proxy_unavailable otherwise) and rate_default ({per_second, burst}: the limit the Control Panel starts a new path app with).

A path app serves part of the site from a folder of its own: php-app runs only the PHP files it lists (every other PHP file under its prefix answers 404) and serves the listed static file types, static serves only the listed types, deny answers 404 under its prefix, proxy forwards its prefix to another website over https. Any of php-app, static and proxy may carry a rate limit per visitor address (429 beyond it). A gate limits a prefix of the platform's own handling to an address list, hosts and methods. Addresses on the environment's firewall web list, and the Corefinity office, always skip a path app's password and always pass its gates and address lists. PHP from a path app is never cached.

Inputs while path apps are on

  • include_rendered (boolean): Also answer path_apps.rendered: the nginx the saved path apps become (default false). front and back for everyone who can see the environment, http for Corefinity staff.

Example

JSON
{
  "name": "corestack_nginx_rules_get",
  "arguments": {
    "site_id": 4211,
    "include_rendered": true
  }
}

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT