| 开发者 | vsamtani |
|---|---|
| 更新时间 | 2026年11月26日 22:25 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
repository_dispatch (or a signed webhook) is a valid counterpart — GitHub Actions, Netlify, Vercel, or a custom CI — including the NV oOS Astro Forge generator, which uses this plugin as its reference bridge.
repository_dispatch POST (10-minute debounce, in-request dedupe). Autosaves, revisions, and auto-drafts are ignored — a rebuild is never wasted on content that does not ship. The request carries the X-Forge-Signature: sha256=… header AND a self-verifying signature inside the payload (HMAC over time.nonce), so the CI pipeline fails closed on spoofed or stale triggers. Disabled until configured.POST /wp-json/nvoos-forge/v1/rebuild accepts only requests carrying a valid signature, so external systems can request a rebuild with proof of the shared secret.POST /wp-json/nvoos-forge/v1/preview-tokens (editors and above) mints a single-use, 15-minute bearer token; POST …/preview-tokens/verify with the token consumes it. Tokens are stored hashed, never in plaintext.GET /wp-json/nvoos-forge/v1/health returns a redacted status (versions, booleans, the webhook host) — never tokens, secrets, or full URLs.GET /wp-json/nvoos-forge/v1/gate reports whether the FRONT END is gated (maintenance / coming soon) and by what: WordPress core's .maintenance, Elementor's Maintenance Mode, or WP Maintenance Mode. Read-only and public (the same disclosure class as /health), booleans + a mode keyword + a plugin slug only. Any other gate plugin declares itself through the nvoos_forge_bridge_gate_state filter. The Astro Forge uses it to tell "the site is gated" from "the gate answered a cached anonymous page".POST /wp-json/nvoos-forge/v1/forms/submit accepts the forged site's rebuilt forms and dispatches them to the NATIVE handler (JetFormBuilder's form processor or Elementor Pro's form ajax handler), so validation, storage, mail, and post-submit actions run exactly as on WordPress — the plugin never reimplements form handling. Submissions are gated by a CORS origin allowlist (your static origin, one per line), per-IP rate limits, a mandatory honeypot + timestamp spam floor (optional Cloudflare Turnstile with the action and hostname pinned to your allowlisted origin), and server-side sanitization of every field. Unknown form → 404; no form handler → 501; caught bots get a silent success. The no-JavaScript fallback is an ordinary form POST that redirects back to the static page with ?form=ok|error.POST /api/revalidate URL) and the shared NVOOS_REVALIDATE_TOKEN, a content change also sends the affected cache tags straight to that endpoint over a server-to-server POST, so the managed frontend purges in seconds instead of waiting for a rebuild. Independent of the GitHub dispatch and off until both fields are saved.GET /wp-json/nvoos-forge/v1/redirects normalizes the redirect rules already stored by Redirection (redirection_items) and Rank Math (rank_math_redirections) into { source, target, type }, so a forged static site keeps legacy URLs alive on cutover day. Read-only and opt-in. Only enabled, exact URL matches are exported (max 500, truncated reported); regex, query-scoped, and non-URL match types cannot be expressed portably in a static _redirects file and are returned as skipped counts instead of being silently widened. An optional shared token gates the endpoint when you do not want your URL structure publicly readable./wp-content/plugins/ or install from the WordPress plugin directory.No. Without an enabled flag, URL, token, and secret, every hook is a no-op.
No. The contract is a signed GitHub repository_dispatch plus a shared HMAC secret — nothing Astro-specific. Any build pipeline that consumes it (GitHub Actions, Netlify, Vercel, custom CI) works with this plugin. The NV oOS Astro Forge is the reference consumer, not a requirement.
Post, page, product, and term saves, trashes, and deletions, plus changes to the front-page, site-title, and tagline options — all debounced to one dispatch per 10 minutes. Autosaves, revisions, and auto-drafts never trigger.
The token and secret are write-only in the settings UI (never echoed), excluded from the health endpoint, and never logged.
Only after you configure it. The rebuild webhook sends one signed POST to the GitHub API host you entered (by default https://api.github.com) per debounce window, from your server, containing the repository dispatch payload. Nothing is sent until the URL, token, and shared secret are saved, and no data is ever sent to the browser.
Only when you enable the optional captcha. With Cloudflare Turnstile selected, each form submission triggers one server-to-server verification call to Cloudflare (https://challenges.cloudflare.com/turnstile/v0/siteverify). Without the captcha, the forms bridge makes no external calls at all — it dispatches submissions to your own WordPress form plugins, in-process.
The limit keys on the connection's real peer address (REMOTE_ADDR). If your host terminates traffic at a trusted proxy (a load balancer, or a CDN that connects from fixed ranges), add that proxy's IP or CIDR range through the nvoos_forge_bridge_trusted_proxies filter so the forwarded client address is used. A forwarding header is ignored by default because it is client-supplied and trivially spoofed.
post_id is answered with a typed 400 nvoos_forge_form_post_id_required instead of forwarding the handler's generic "the form is invalid". Elementor resolves the widget inside the carrier document, so the submission could never succeed — and because the existence check deliberately searches every post, the render was still found, which made the cause invisible.$_POST['action'] = 'elementor_pro_forms' (the NONCE action), but Ajax_Handler::is_form_submitted() gates the dispatch on the action the handler is registered under — elementor_pro_forms_send_form. The request payload is now built by a single testable elementor_request() method so the contract cannot drift again.form_fields map as well as the flat field keys. PHP's own POST parsing turns bracket keys such as form_fields[email] into a nested map, and JetFormBuilder's request reads that map; the bridge's flat payload left it empty, so the handler saw the submission but not its values.GET /wp-json/nvoos-forge/v1/gate — the front-end gate state (maintenance / coming soon) for the Astro Forge's page-session probe (Proposal 152). Detects WordPress core .maintenance, Elementor Maintenance Mode, and WP Maintenance Mode; nvoos_forge_bridge_gate_state lets any other gate plugin declare itself. Read-only: booleans, a mode keyword and a plugin slug./api/revalidate) plus the shared NVOOS_REVALIDATE_TOKEN receives the affected cache tags over a server-to-server POST on each content change, so a managed frontend purges in seconds; independent of the GitHub dispatch and off by default._jet_engine_booking_form_id / _jet_engine_refer) to re-target a dispatch to a different form — the resolved, visibility-checked identifier always wins.X-Forwarded-For header. REMOTE_ADDR is used by default; a forwarding chain is honored only when the direct peer is a configured trusted proxy (nvoos_forge_bridge_trusted_proxies), and then the rightmost untrusted hop is used._redirects file) and decodes provider columns without instantiating PHP objects.wp_send_json() calls from JetFormBuilder / Elementor no longer terminate the REST request. The dispatch runs with wp_doing_ajax() true and the echoed payload is captured under an output buffer, so the bridge always returns its own envelope.GET /nvoos-forge/v1/redirects normalizes Redirection (redirection_items) and Rank Math (rank_math_redirections) rules into { source, target, type } for the forged static site's _redirects map. Enabled/group-status aware, exact-URL only, bounded to 500 rules with an explicit truncated flag, skipped-count reporting for regex/query/non-URL matches, optional shared-token gate.redirectsEnabled, redirectsAvailable, and the detected provider list; Settings → Forge Bridge gains a stored-redirects section with provider detection.POST /nvoos-forge/v1/forms/submit dispatches to the native JetFormBuilder / Elementor Pro handlers (origin allowlist, per-IP rate limit, honeypot + timestamp spam floor, optional Cloudflare Turnstile with action/hostname pinning, server-side field sanitization, typed 404/501 contracts, no-JS redirect fallback).