{"id":380651,"date":"2026-11-16T19:24:21","date_gmt":"2026-11-16T19:24:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/bluefairy-api-gateway\/"},"modified":"2026-11-16T19:24:07","modified_gmt":"2026-11-16T19:24:07","slug":"bluefairy-api-gateway","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/bluefairy-api-gateway\/","author":23552439,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.4","stable_tag":"1.0.4","tested":"7.1.4","requires":"6.6","requires_php":"8.1","requires_plugins":null,"header_name":"BlueFairy API Gateway","header_author":"Blue Fairy Development","header_description":"REST response caching, per-IP rate limiting and signed outbound webhooks for WordPress \u2014 a hardened API layer for headless sites and integrations. Add BlueFairy API Gateway Pro for per-content-type cache rules, tag purging, DDoS auto-block, webhook retries, CRM presets and API keys.","last_updated":"2026-11-16 19:24:07","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/ko-fi.com\/bluefairydevelopment","header_plugin_uri":"https:\/\/wordpress.bluefairydevelopment.com\/product\/bluefairy-api-gateway\/","header_author_uri":"https:\/\/bluefairydevelopment.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":50,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.4":{"tag":"1.0.4","author":"bluefairydevelopment","date":"2026-11-16 19:24:07","revision":3805955}},"upgrade_notice":{"1.0.4":"<p>Security fix: API-key traffic is always rate-limited. IPv6 clients are counted per \/64 network; raise a rule&#039;s limit if legitimate clients share one.<\/p>","1.0.3":"<p>Readme wording only. No change to code, settings or data.<\/p>","1.0.2":"<p>Fixes a &quot;triggered too early&quot; translation notice after an update, and brings back scheduled jobs lost to a cron wipe. No change to settings or data.<\/p>","1.0.1":"<p>Up to 500 cache rules, rate-limit rules and webhooks (was one, one and three), as in Pro. No change to settings or data.<\/p>","1.0.0":"<p>First release \u2014 nothing to upgrade from. Rate limiting is on from activation at 300 requests per minute per IP on every REST route; behind Cloudflare or a load balancer, add the proxy ranges under Settings \u2192 Rate limit \u2192 Trusted proxies before relying on it.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3805955,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3805955,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3805955,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3805955,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3805955,"resolution":"1","location":"assets","locale":"","width":1238,"height":802},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3805955,"resolution":"2","location":"assets","locale":"","width":1238,"height":910},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3805955,"resolution":"3","location":"assets","locale":"","width":1238,"height":784},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3805955,"resolution":"4","location":"assets","locale":"","width":1238,"height":1023},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3805955,"resolution":"5","location":"assets","locale":"","width":1238,"height":1512},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3805955,"resolution":"6","location":"assets","locale":"","width":1238,"height":1312}},"screenshots":{"1":"Dashboard \u2014 cache hit rate and webhook success rate over 24 hours, the recent failed deliveries with Retry, the row counts and the status endpoint.","2":"Cache \u2014 the seeded \"All routes\" rule (1 of 500) with its route glob, TTL and Enabled badge, Purge all, and the form to add another rule.","3":"Rate limit \u2014 the seeded per-IP rule: 300 requests per 60 seconds on every route.","4":"Webhooks \u2014 three signed webhooks with their events and last-delivery status, Send test, and the Delivery log button.","5":"Settings \u2014 the cache, rate-limit, webhooks and advanced groups.","6":"Delivery log \u2014 every delivery with its HTTP status; a failed delivery's response opened, with Retry."}},"plugin_section":[],"plugin_tags":[146,141196,171765,23853,34953],"plugin_category":[52],"plugin_contributors":[283692],"plugin_business_model":[],"class_list":["post-380651","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-headless","plugin_tags-rate-limit","plugin_tags-rest-api","plugin_tags-webhooks","plugin_category-performance","plugin_contributors-bluefairydevelopment","plugin_committers-bluefairydevelopment"],"banners":{"banner":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/banner-772x250.png?rev=3805955","banner_2x":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/banner-1544x500.png?rev=3805955","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/icon-128x128.png?rev=3805955","icon_2x":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/icon-256x256.png?rev=3805955","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-1.png?rev=3805955","caption":"Dashboard \u2014 cache hit rate and webhook success rate over 24 hours, the recent failed deliveries with Retry, the row counts and the status endpoint."},{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-2.png?rev=3805955","caption":"Cache \u2014 the seeded \"All routes\" rule (1 of 500) with its route glob, TTL and Enabled badge, Purge all, and the form to add another rule."},{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-3.png?rev=3805955","caption":"Rate limit \u2014 the seeded per-IP rule: 300 requests per 60 seconds on every route."},{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-4.png?rev=3805955","caption":"Webhooks \u2014 three signed webhooks with their events and last-delivery status, Send test, and the Delivery log button."},{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-5.png?rev=3805955","caption":"Settings \u2014 the cache, rate-limit, webhooks and advanced groups."},{"src":"https:\/\/ps.w.org\/bluefairy-api-gateway\/assets\/screenshot-6.png?rev=3805955","caption":"Delivery log \u2014 every delivery with its HTTP status; a failed delivery's response opened, with Retry."}],"raw_content":"<!--section=description-->\n<p>BlueFairy API Gateway sits in front of the WordPress REST API and does three things, each managed from one screen at <strong>Settings \u2192 API Gateway<\/strong>.<\/p>\n\n<p><strong>Response cache.<\/strong> Anonymous <code>GET<\/code> responses are stored and served back with an <code>X-BF-Cache: HIT<\/code> header; every REST response is labelled <code>HIT<\/code>, <code>MISS<\/code> or <code>BYPASS<\/code> so you can see the decision from <code>curl<\/code>. Requests from logged-in users, or carrying an <code>Authorization<\/code>, <code>X-WP-Nonce<\/code> or <code>X-BF-API-Key<\/code> header, are never cached. Responses that are not 2xx, that stream, that set a cookie or whose <code>Cache-Control<\/code> says <code>no-store<\/code>, <code>private<\/code>, <code>no-cache<\/code> or <code>max-age=0<\/code> are never stored. Up to 500 cache rules, each matched by route glob (<code>wp\/v2\/posts\/**<\/code> \u2014 a trailing <code>\/**<\/code> or <code>\/*<\/code> matches the collection route too) with its own lifetime; the most specific matching rule wins, and one is seeded on activation as \"all routes, 60 seconds\". The cache is purged automatically when a post, term or comment changes, and by hand from the Cache tab or <code>POST \/bfag\/v1\/cache\/purge<\/code>. Responses live in your persistent object cache (Redis, Memcached) when you have one, otherwise in transients \u2014 capped there at 64 KB per response and one hour, and swept every five minutes.<\/p>\n\n<p><strong>Rate limiting.<\/strong> A sliding-window counter per client IP and rule (an IPv6 client is counted by its \/64 network, so rotating addresses within it does not escape the limit). The breaching request gets <code>429 Too Many Requests<\/code> with <code>Retry-After<\/code>, <code>X-BF-RateLimit-Limit<\/code> and <code>X-BF-RateLimit-Window<\/code>. Up to 500 rules, each counting the routes its glob matches; one is seeded as 300 requests per 60 seconds across every route, and logged-in users who can edit posts are exempt by default in their own browser session (requests made with an API key or an application password are always limited). One forwarded-IP header of your choosing (<code>X-Forwarded-For<\/code> by default; <code>CF-Connecting-IP<\/code>, <code>X-Real-IP<\/code> or <code>True-Client-IP<\/code>) is honoured, and only from the proxy ranges you list, so a visitor cannot pick their own bucket. A client over the limit is refused from a marker for the rest of its window without touching the database; with a persistent object cache the count itself is an atomic increment rather than a query. The hit log is pruned every five minutes.<\/p>\n\n<p><strong>Signed outbound webhooks.<\/strong> Up to 500 webhooks, each subscribing to one event: post published, updated or deleted; user registered or updated; comment created; and, with WooCommerce, order created, order status changed, order completed, product updated. Each delivery is a JSON <code>POST<\/code> carrying <code>X-BF-Event<\/code>, <code>X-BF-Delivery<\/code>, <code>X-BF-Timestamp<\/code> and <code>X-BF-Signature: sha256=HMAC-SHA256(timestamp.body, secret)<\/code>, so the receiver can verify both origin and freshness. Deliveries are collected during the request and sent once after the response \u2014 twenty at most, and for fifteen seconds at most, the rest through a WP-Cron event so a bulk import or a dead endpoint never ties up the request that saved it \u2014 logged with their HTTP status and response body, and any failed delivery can be resent from the log. Targets must be <code>https:\/\/<\/code>; a secret is generated for you and shown once, right after saving, for you to copy into the receiver.<\/p>\n\n<p><strong>Dashboard.<\/strong> Cache hit rate and webhook success rate over the last 24 hours, the current size of the rate-limit log, the ten most recent failed deliveries with a Retry button, and the same figures at <code>GET \/bfag\/v1\/status<\/code> for a monitoring tool \u2014 a route that is never rate-limited.<\/p>\n\n<p><strong>Add API Gateway Pro<\/strong> for purges narrowed to the tags a change touches; rate limits per user and per API key with penalty blocks; DDoS auto-block with a blocked-IPs panel; automatic webhook retries with back-off and failure alerts by email; Salesforce, HubSpot and Mailchimp presets; a verified incoming-webhook endpoint (HubSpot signed; Salesforce and Mailchimp shared secret); a webhook REST API; API keys with scopes; and WPGraphQL query caching. Pro installs alongside this plugin rather than replacing it.<\/p>\n\n<h3>Admin Instructions<\/h3>\n\n<p>Everything lives under <strong>Settings \u2192 API Gateway<\/strong>, in five tabs.<\/p>\n\n<p><strong>Dashboard<\/strong> \u2014 three cards (cache hit rate, webhook success rate for outgoing deliveries, and the Pro <em>Active blocks<\/em> count \u2014 shown as <em>Blocked (Pro)<\/em> without the add-on) recomputed every five minutes or when you press <strong>Refresh<\/strong>; the ten newest failed deliveries with <strong>Retry<\/strong>; the raw counts; and the status endpoint URL with a <strong>Copy<\/strong> button. Timestamps are shown in the site's timezone.<\/p>\n\n<p><strong>Cache<\/strong> \u2014 the rules table with an Enabled\/Disabled badge you can click, <strong>Edit<\/strong> and <strong>Delete<\/strong>, and <strong>Purge all<\/strong>. The add\/edit form takes a label, a route glob (matched without the leading slash: <code>wc\/v3\/products\/*<\/code> matches <code>wc\/v3\/products<\/code> and <code>wc\/v3\/products\/12<\/code>), a TTL in seconds and optional comma-separated tags. Every content change purges every rule; with API Gateway Pro a tagged rule is purged only by the changes that touch its tags. Edit the seeded \"All routes\" rule to narrow it. With more than one rule the most specific one wins, and the table is listed in that order.<\/p>\n\n<p><strong>Rate limit<\/strong> \u2014 the rules table and a form with a label, <em>Count by<\/em> (IP address), a route glob, and the limit: how many requests are allowed in how many seconds. Values outside 1\u201365535 requests or 1\u201386400 seconds are refused rather than silently changed.<\/p>\n\n<p><strong>Webhooks<\/strong> \u2014 the webhooks table with <strong>Edit<\/strong>, <strong>Send test<\/strong> and <strong>Delete<\/strong>, the <strong>Delivery log<\/strong> button, and the add\/edit form: label, <code>https:\/\/<\/code> URL, event, signing secret (blank generates one and shows it once after saving), extra headers as <code>Name: value<\/code> lines, and an Enabled box. Press <strong>Send test<\/strong> on a new webhook: the notice reports the HTTP status, and the delivery log shows the receiver's response under each row.<\/p>\n\n<p><strong>Settings<\/strong> \u2014 the cache switch and <em>New-rule TTL<\/em>; the rate-limiting switch, <em>Exempt editors<\/em>, <em>Trusted proxies<\/em> and <em>Client address header<\/em>; the stored-payload cap and delivery-log retention; debug logging, the WP-Cron notice switch and <em>Delete data on uninstall<\/em>. The notification email and failure threshold appear only with the Pro add-on, which is what sends the alerts.<\/p>\n\n<p>To confirm the cache from the command line, request a public route twice and read the header: <code>curl -sI https:\/\/example.com\/wp-json\/wp\/v2\/posts | grep -i x-bf-cache<\/code> \u2014 <code>MISS<\/code> then <code>HIT<\/code>.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to services outside your site in one way only: <strong>outbound webhooks that you configure<\/strong>. Nothing is sent anywhere until an administrator adds a webhook on <strong>Settings \u2192 API Gateway \u2192 Webhooks<\/strong>, and the plugin never contacts Blue Fairy Development or any other fixed address \u2014 there is no telemetry, licence check or update server.<\/p>\n\n<ul>\n<li><strong>What it is used for:<\/strong> notifying another system (your own app, an automation service, a CRM relay \u2014 whatever endpoint you choose) that something happened on your site.<\/li>\n<li><strong>Where data is sent:<\/strong> only to the <code>https:\/\/<\/code> URL you enter for each webhook, and only for the one event that webhook subscribes to. <strong>Send test<\/strong> sends a sample <code>test<\/code> event to that URL when you press it.<\/li>\n<li><strong>What is sent, and when:<\/strong> a JSON <code>POST<\/code> each time the subscribed event happens, carrying the event name, your site URL, a timestamp and the object's allow-listed fields \u2014 for a post: id, type, status, title, slug, link, author id and dates; for a user: id, login, email, display name and roles; for a comment: id, post id, author name, author email, approval status, date and type; for a WooCommerce order: id, status, currency, total, customer id, billing email and date created; for a product: id, name, SKU, status, price and type. Each request also carries the <code>X-BF-Event<\/code>, <code>X-BF-Delivery<\/code>, <code>X-BF-Timestamp<\/code> and <code>X-BF-Signature<\/code> headers and any extra headers you added to the webhook.<\/li>\n<li><strong>Whose terms apply:<\/strong> the receiving service is one you choose and control, so its terms of service and privacy policy are the ones that govern the data. Review them before sending personal data such as email addresses to it, and mention the transfer in your own site's privacy policy where the law requires.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>bluefairy-api-gateway<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the zip from <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong>.<\/li>\n<li>Activate the plugin from the <strong>Plugins<\/strong> screen. PHP 8.1 or newer is required; activation refuses otherwise.<\/li>\n<li>Open <strong>Settings \u2192 API Gateway<\/strong>.<\/li>\n<\/ol>\n\n<p>Activation creates six database tables, seeds one cache rule and one rate-limit rule, grants the <code>bfag_manage_gateway<\/code> capability to administrators and schedules four recurring WP-Cron jobs. The cache and the rate limiter are on from the first request; nothing is sent anywhere until you add a webhook.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20am%20i%20seeing%20x-bf-cache%3A%20bypass%3F\"><h3>Why am I seeing X-BF-Cache: BYPASS?<\/h3><\/dt>\n<dd><p>BYPASS means the request or the response was not cacheable. On the request side: the cache is switched off; the method is not GET or HEAD; you are logged in (a browser with a WordPress cookie, including the admin's own browser); the request carries an <code>Authorization<\/code>, <code>X-WP-Nonce<\/code> or <code>X-BF-API-Key<\/code> header; the route is under <code>\/bfag\/v1<\/code>; or no enabled cache rule matches the route. On the response side: the status is not 2xx; the response streams (<code>text\/event-stream<\/code>); it sets a cookie (including through PHP's <code>setcookie()<\/code>, as WooCommerce's guest cart session does \u2014 a plugin that sets a cookie on every request keeps responses from being stored); or its <code>Cache-Control<\/code> says <code>no-store<\/code>, <code>private<\/code>, <code>no-cache<\/code> or <code>max-age=0<\/code>. Test with <code>curl<\/code> from a fresh shell, not from a logged-in browser tab.<\/p><\/dd>\n<dt id=\"does%20it%20work%20without%20redis%20or%20memcached%3F\"><h3>Does it work without Redis or Memcached?<\/h3><\/dt>\n<dd><p>Yes. With a persistent object cache responses are stored in the object-cache group <code>bfag_responses<\/code>; without one they are stored as transients in the options table \u2014 capped at 64 KB per response and one hour, with expired entries swept every five minutes \u2014 and purging works the same way on both. A persistent object cache is faster, has no size cap, keeps the options table small and turns the rate-limit count and the cache statistics into in-memory increments, so use one on a busy site.<\/p><\/dd>\n<dt id=\"what%20happens%20behind%20cloudflare%2C%20a%20load%20balancer%20or%20a%20reverse%20proxy%3F\"><h3>What happens behind Cloudflare, a load balancer or a reverse proxy?<\/h3><\/dt>\n<dd><p>By default the client IP is <code>REMOTE_ADDR<\/code>, which behind a proxy is the proxy's own address \u2014 so every visitor would share one rate-limit bucket. List the proxy's addresses or CIDR ranges under <strong>Settings \u2192 Rate limit \u2192 Trusted proxies<\/strong> (for Cloudflare, its published IP ranges) and pick the <strong>Client address header<\/strong> your proxy writes (<code>X-Forwarded-For<\/code> by default; for Cloudflare, <code>CF-Connecting-IP<\/code>). Only when <code>REMOTE_ADDR<\/code> is inside one of those ranges is that one header read \u2014 for <code>X-Forwarded-For<\/code>, taking the right-most address that is not itself a trusted proxy. Every other header, and headers from anywhere else, are ignored, so a visitor cannot forge their way into a different bucket, not even by adding an <code>X-Real-IP<\/code> of their own in front of a proxy that only manages <code>X-Forwarded-For<\/code>.<\/p><\/dd>\n<dt id=\"does%20uninstalling%20delete%20my%20data%3F\"><h3>Does uninstalling delete my data?<\/h3><\/dt>\n<dd><p>Deleting the plugin always removes its options, transients, cron events and the <code>bfag_manage_gateway<\/code> capability. Your rules, webhooks and delivery log \u2014 the six <code>bfag_<\/code> database tables \u2014 are dropped only if you ticked <strong>Delete data on uninstall<\/strong> under Settings \u2192 Advanced first. By default they stay, because a delivery log is a record of what was sent, not a cache. Deactivating removes only the cron events and the capability.<\/p><\/dd>\n<dt id=\"how%20do%20retries%20work%3F\"><h3>How do retries work?<\/h3><\/dt>\n<dd><p>In the free plugin a failed delivery \u2014 any non-2xx answer, or no answer within five seconds \u2014 is marked <code>failed<\/code> in the log and stays there. Press <strong>Retry<\/strong> \u2014 offered on failed deliveries only \u2014 on the dashboard or in the delivery log to resend the stored payload bytes as the next attempt, with a fresh timestamp and signature and the same <code>X-BF-Delivery<\/code> id. A delivery whose stored payload was truncated at the <em>Max stored payload<\/em> setting cannot be retried, because the stored bytes are no longer what was signed. Automatic retries with back-off (one minute, five minutes, thirty minutes, up to a per-webhook limit) and failure alerts are part of API Gateway Pro.<\/p><\/dd>\n<dt id=\"how%20does%20my%20receiver%20verify%20the%20signature%3F\"><h3>How does my receiver verify the signature?<\/h3><\/dt>\n<dd><p>Compute <code>HMAC-SHA256<\/code> with the webhook's secret over the string <code>X-BF-Timestamp + \".\" + raw request body<\/code>, hex-encode it, prefix <code>sha256=<\/code>, and compare it to <code>X-BF-Signature<\/code> in constant time (<code>hash_equals()<\/code> in PHP, <code>crypto.timingSafeEqual()<\/code> in Node). Read the raw body bytes before any framework parses them. Reject timestamps more than a few minutes old to defeat replay. Full PHP and Node examples are in the features guide shipped with the plugin, <code>docs\/ApiGatewayFeaturesGuide.pdf<\/code>, under <em>Webhooks \u2192 Verifying at the receiver<\/em>.<\/p><\/dd>\n<dt id=\"why%20does%20editing%20a%20blog%20post%20empty%20the%20whole%20cache%3F\"><h3>Why does editing a blog post empty the whole cache?<\/h3><\/dt>\n<dd><p>Because the free plugin has no way to tell which cached responses a change touches, so any post, term or comment change flushes everything. API Gateway Pro answers the <code>bfag_cache_purge_tags<\/code> filter with the tags each change touches (<code>post:42<\/code>, <code>type:product<\/code>, <code>term:7<\/code>, <code>tax:category<\/code>, <code>all<\/code>), so a rule tagged <code>type:product<\/code> survives a blog post edit. A rule with no tags is purged on every content change even with Pro; add tags to narrow purging to those tags.<\/p><\/dd>\n<dt id=\"will%20my%20logged-in%20users%20or%20my%20app%27s%20authenticated%20api%20calls%20be%20cached%3F\"><h3>Will my logged-in users or my app's authenticated API calls be cached?<\/h3><\/dt>\n<dd><p>No. A request with a WordPress login cookie, an <code>Authorization<\/code> header (Application Passwords, bearer tokens), an <code>X-WP-Nonce<\/code> or an <code>X-BF-API-Key<\/code> is never served from or stored in the cache, because such a response may contain data nobody else should see. Only anonymous public reads are cached.<\/p><\/dd>\n<dt id=\"how%20many%20rules%20and%20webhooks%20can%20i%20add%3F\"><h3>How many rules and webhooks can I add?<\/h3><\/dt>\n<dd><p>Up to 500 cache rules, 500 rate-limit rules and 500 webhooks \u2014 the same with or without API Gateway Pro. The ceiling keeps the admin lists and the rule matching on every request quick; a developer can lower it, or raise it to at most 1,000, with the <code>bfag_cache_rule_limit<\/code>, <code>bfag_rate_limit_rule_limit<\/code> and <code>bfag_webhook_limit<\/code> filters. When every one is in use the add form gives way to a line saying so: edit or delete one to add another. Rate limiting counts by IP address; Pro adds per-user and per-API-key counting.<\/p><\/dd>\n<dt id=\"the%20webhook%20will%20not%20save%20%E2%80%94%20%22url%20refused%3A%20it%20must%20start%20with%20https%3A%2F%2F%20and%20resolve%20to%20a%20public%20address%22.\"><h3>The webhook will not save \u2014 \"URL refused: it must start with https:\/\/ and resolve to a public address\".<\/h3><\/dt>\n<dd><p>Each refused field has its own notice: <em>URL refused\u2026<\/em> for the URL, <em>Webhook not saved: the label must be 1\u2013200 characters<\/em> for the label, <em>Webhook not saved: choose an event from the list<\/em> for the event, and <em>Webhook not saved: check the extra headers (one Name: value per line) and the secret (255 characters at most)<\/em> for the rest. Your entries are kept in the form.<\/p>\n\n<p>The URL must start with <code>https:\/\/<\/code> and must pass WordPress's own <code>wp_http_validate_url()<\/code> check, which refuses loopback and private addresses such as <code>localhost<\/code>, <code>127.0.0.1<\/code> or <code>10.x.x.x<\/code>. For local development a developer can allow <code>http:\/\/<\/code> with the <code>bfag_webhook_allow_http<\/code> filter. The event must be one offered in the dropdown \u2014 a WooCommerce event disappears from the list when WooCommerce is deactivated.<\/p><\/dd>\n<dt id=\"i%20let%20the%20plugin%20generate%20the%20signing%20secret%20and%20did%20not%20copy%20it.%20where%20is%20it%3F\"><h3>I let the plugin generate the signing secret and did not copy it. Where is it?<\/h3><\/dt>\n<dd><p>A generated secret is shown exactly once, on the Webhooks tab right after you save, with a <strong>Copy<\/strong> button; after that the stored secret cannot be read back from the admin page. If you missed it, edit the webhook and either type your own secret into the field, or tick <strong>Generate a new secret<\/strong> and save \u2014 the new one is shown once in the same way. Either way, update the receiver: deliveries fail there until it has the new secret.<\/p><\/dd>\n<dt id=\"does%20it%20need%20wp-cron%3F\"><h3>Does it need WP-Cron?<\/h3><\/dt>\n<dd><p>The hit-log prune, the delivery-log prune and the dashboard figures run on WP-Cron. The first 20 webhook deliveries of a request are sent at the end of that request; the rest are queued and sent by <code>bfag_cron_flush_pending<\/code>, a single event scheduled on demand. If <code>DISABLE_WP_CRON<\/code> is set the plugin shows a notice on its own screen; make sure a system cron runs <code>wp-cron.php<\/code>, then tick <strong>Hide the WP-Cron notice<\/strong>. There are no WP-CLI commands; <code>wp cron event run bfag_cron_prune_hits<\/code> runs a job on demand.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%3F\"><h3>Does it work with WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. While WooCommerce is active four more events are offered: order created, order status changed, order completed and product updated, each carrying the order or product fields (id, status, currency, total, customer id, billing email; id, name, SKU, status, price, type). WooCommerce's own REST routes under <code>wc\/v3\/\u2026<\/code> can be cached and rate-limited like any other, subject to the same rule that authenticated requests are never cached.<\/p><\/dd>\n<dt id=\"does%20it%20support%20multisite%3F\"><h3>Does it support multisite?<\/h3><\/dt>\n<dd><p>Network activation provisions every site \u2014 tables, the seeded rules, the capability and the cron jobs \u2014 and a site added later is provisioned when it is created. Each site keeps its own rules, webhooks and settings. Uninstalling cleans up on every site of the network.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Security: a request authenticated by an API key or application password is now always rate-limited and can be blocked, whoever the key belongs to. \"Exempt editors\" now covers only an editor's own browser session. New filter <code>bfag_rate_limit_exempt<\/code>.<\/li>\n<li>Change: rate-limit rules count an IPv6 client by its \/64 network, so rotating addresses within one \/64 no longer escapes a limit. Devices sharing one IPv6 \/64 now share one budget.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Readme: the rate-limit form description is reworded. No code change.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fix: the first page load after an update could book the scheduled jobs during plugin loading, before WordPress's <code>init<\/code>. With WooCommerce (or another plugin that translates its cron schedule names) active, WordPress logged \"Translation loading for the woocommerce domain was triggered too early\". The jobs are now booked at <code>init<\/code>, on that same page load.<\/li>\n<li>Fix: a scheduled job lost to a cron wipe or a restore (hit-log, delivery-log and cached-response pruning, the dashboard figures) is booked again on the next page load. Before, it stayed lost until the plugin was re-activated and those logs were never pruned.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Up to 500 cache rules, 500 rate-limit rules and 500 webhooks \u2014 was one, one and three. The ceiling is now the same with or without API Gateway Pro, which is sold on its own features alone. The page shown when every one is in use, and the notice when a save is refused for that reason, no longer mention Pro.<\/li>\n<li>The Pro panel lists only what Pro adds, with no limit among them.<\/li>\n<li>Packaging for WordPress.org; no change to settings or data.<\/li>\n<li>The readme gains an <em>External services<\/em> section describing the outbound webhooks you configure.<\/li>\n<li>The Markdown feature reference is no longer in the plugin zip; everything it held \u2014 including the receiver signature examples and the Pro comparison \u2014 is in the features guide, <code>docs\/ApiGatewayFeaturesGuide.pdf<\/code>.<\/li>\n<li>The time-limit lift used while a network-wide activation provisions every site is documented in the code.<\/li>\n<li>Screenshots retaken on this version; a sixth shows the delivery log. The features guide is rebuilt with the new dashboard and delivery-log images.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<li>REST response cache with <code>X-BF-Cache: HIT<\/code> \/ <code>MISS<\/code> \/ <code>BYPASS<\/code>, one route-glob rule, object-cache or transient storage (64 KB \/ one-hour cap on transients), generation-based purging on post, term and comment changes, Purge all, and <code>POST \/bfag\/v1\/cache\/purge<\/code>.<\/li>\n<li>Sliding-window rate limiting per IP and rule with <code>429<\/code>, <code>Retry-After<\/code> and <code>X-BF-RateLimit-*<\/code> headers; one rule seeded at 300 per 60 s; editors exempt by default in a browser session (never API-key traffic); trusted-proxy IP resolution from one chosen header; refused requests served from a marker with no database work.<\/li>\n<li>Up to three signed outbound webhooks on six WordPress events and four WooCommerce events, HMAC-SHA256 <code>X-BF-Signature<\/code> over <code>timestamp.body<\/code>, delivery after the response (twenty at most, fifteen seconds at most, the rest by WP-Cron), a delivery log with Send test and Retry on failed outgoing deliveries, payload truncation and retention pruning.<\/li>\n<li>Dashboard figures recomputed every five minutes, <code>GET \/bfag\/v1\/status<\/code> for monitors, the <code>bfag_manage_gateway<\/code> capability, multisite provisioning.<\/li>\n<li>Thirty-six <code>bfag_*<\/code> actions and filters as the add-on contract.<\/li>\n<li>Compatibility: tested against WordPress 7.1; requires PHP 8.1 or newer. Database schema version 1.0.3 (internal).<\/li>\n<\/ul>","raw_excerpt":"REST response caching, per-IP rate limiting and signed outbound webhooks \u2014 a hardened API layer for headless WordPress sites and integrations.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/380651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=380651"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/bluefairydevelopment"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=380651"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=380651"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=380651"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=380651"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=380651"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=380651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}