[WordPress] 外掛分享: NV oOS Forge Bridge

首頁 › 外掛目錄 › NV oOS Forge Bridge
WordPress 外掛 NV oOS Forge Bridge 的封面圖片
全新外掛
安裝啟用
—
尚無評分
4 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v0.3.4 上架:2026-11-25

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「NV oOS Forge Bridge」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

NV oOS Forge Bridge is the WordPress half of a CMS-to-CI rebuild loop, and it works standalone. WordPress stays the CMS; the plugin tells your build pipeline when content moved. Any pipeline that can consume a GitHub 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.

Rebuild webhook — every post, page, product, or term save/trash/delete, plus front-page setting changes, schedules one debounced, HMAC-signed 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.
Inbound rebuild trigger — 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.
Preview tokens — 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.
Health — GET /wp-json/nvoos-forge/v1/health returns a redacted status (versions, booleans, the webhook host) — never tokens, secrets, or full URLs.
Gate state — 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”.
Form submissions from a generated static site — 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.
Direct revalidation for managed frontends (optional) — when you supply a revalidate endpoint (the forged site’s 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.
Stored redirects for a generated static site — 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.

External Services
This plugin connects to the GitHub API (https://api.github.com, or the custom dispatches URL you configure) to trigger a rebuild of your generated frontend.

What and when: one repository_dispatch POST per content change, debounced to once every 10 minutes, sent server-to-server on the WordPress shutdown hook.
What is sent: the repository dispatch payload (event type, your site URL, and a timestamp/nonce/signature proof the build pipeline re-verifies). The request is also signed with the X-Forge-Signature: sha256=… header using the shared secret you configure.
No account data is collected or tracked, and nothing is sent unless you have enabled the webhook and saved a dispatches URL, token, and secret.
GitHub Terms of Service: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service
GitHub Privacy Statement: https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement

Optionally, when you enable the Cloudflare Turnstile captcha for the forms bridge, each form submission triggers one server-to-server verification call to https://challenges.cloudflare.com/turnstile/v0/siteverify (your Turnstile secret plus the visitor’s token and IP address). Without the captcha, the forms bridge makes no external calls.

Cloudflare Terms of Service: https://www.cloudflare.com/website-terms/
Cloudflare Privacy Policy: https://www.cloudflare.com/privacypolicy/

Optionally, when you save a revalidate endpoint, each content change also sends one server-to-server POST to that URL (the site you configure — normally your own managed frontend) with the affected cache tags and a Bearer token. The target is whatever URL you enter; nothing is sent unless both the URL and the token are saved, and no data goes to NV Digital Solutions.
Source Code
The uncompiled source of this plugin lives in the public repository at https://github.com/nvdigitalsolutions/mcp-ai-wpoos under plugins/nvoos-forge-bridge/. The plugin ships no compiled assets; everything in the package is the readable source.

延伸相關外掛

文章
Filter
Mastodon