Geo-block for Vendure
Per-channel geo-restriction that the free tier really enforces: country rules, IPv4/IPv6 allowlist, business hours, maintenance windows and opt-in purchase enforcement. A licence adds 37 region presets, subdivisions, soft-block mode, the audit log and a "what-if" simulator.
Install on Vendure: add the package with npm, yarn or pnpm, then register GeoBlockPlugin in vendure-config.ts. All steps
npm
npm install @huloglobal/vendure-plugin-geo-block yarn
yarn add @huloglobal/vendure-plugin-geo-block pnpm
pnpm add @huloglobal/vendure-plugin-geo-block Register it in vendure-config.ts
// vendure-config.ts
import { GeoBlockPlugin } from '@huloglobal/vendure-plugin-geo-block' ;
export const config: VendureConfig = {
plugins: [
GeoBlockPlugin.init({
publicBaseUrl: 'https://shop.example.com' ,
licenceKey: process.env.HULO_LICENCE_KEY_GEO_BLOCK,
}),
// ... your other plugins
],
};What it does
Built for production from day one.
Per-channel geo-restrictions you can actually understand. Pick from 37 hand-curated region presets (EU, EEA, Schengen, GCC, ANZ, NATO, OECD, Commonwealth, English-speaking, MENA, ASEAN, Nordic, …) or add countries manually. Soft-block mode for "browse-only" markets. IPv4 and IPv6 allowlist for offices and payment processors, business hours, maintenance windows and, if you switch it on, server-side refusal of purchases from blocked visitors. With a licence every block decision is logged for the admin Stats panel.
37 region presets
With a licence (the free tier has five: Worldwide, UK only, EU, North America and Oceania). One-click setups: EU, EEA, EFTA, Schengen, Nordic, DACH, Benelux, Balkans, GCC, MENA, ASEAN, APAC, East Asia, South Asia, LATAM, North America, Caribbean, Oceania, ANZ, G7, G20, BRICS, OECD, NATO, Five Eyes, Commonwealth, English-speaking, and more.
Per-channel rules
Each Vendure channel gets its own rules — perfect for multi-storefront installs (e.g. one UK-only channel, one EU channel).
Soft-block (browse-only)
With a licence. Mode toggle: full block hides the storefront entirely; soft mode renders it with a banner explaining you don't ship to their country. A soft block is a banner only: it does not hide or refuse the checkout (use a full block with purchase enforcement for that). On the free tier a soft block acts as a full block.
Purchase enforcement (opt-in)
Switch on Refuse purchases from blocked visitors and Vendure itself refuses adding to the basket and checkout for a visitor your rules fully block, even one who skips the storefront and calls the Shop API. Off by default; it fails open, so an unknown country or a lookup error never stops a sale.
IP allowlist with CIDR
IPs or IPv4 and IPv6 ranges (203.0.113.0/24, 2001:db8::/48) that bypass every rule. For your office, oncall, monitoring probes, payment processors. Add my IP adds the address the server sees for you.
Audit log + stats
With a licence, every block decision logged with country, region, IP, UA, channel and reason. Admin Stats tab shows top blocked countries, daily series, and reason breakdown.
"What-if" simulator
With a licence, test exactly what your rules will do for a hypothetical visitor — country, UK region, IP — before saving anything to production.
Custom block page
Per-channel message, optional redirect URL and optional logo URL. Or fall back to sensible defaults per block reason.
Subdivisions
With a licence, restrict a country to some of its subdivisions: US states, Canadian provinces, Australian states, German Länder, UK countries (ENG / WLS / SCT / NIR) and more, from the standard ISO 3166-2 codes.
Country from your CDN or a local MaxMind file
Reads cf-ipcountry / Akamai / Fastly country headers from a trusted proxy. Without one, it can read a MaxMind-format database file already on your server; the plugin never downloads it. A visitor whose country cannot be resolved is allowed. The Settings tab shows where your own country came from.
Business hours and maintenance windows
Opening hours per channel (overnight ranges and time zones handled) and per-channel maintenance windows, both set in the admin. The IP allowlist gets in; allowlisted crawlers bypass them for page views (so search engines keep the site indexed), never for purchases.
Crawlers, verified
Search and social crawlers bypass the rules for page views by default. Switch on Verify Googlebot and Bingbot and a visitor claiming to be one must pass a reverse and forward DNS check.
Status codes that search engines understand
The block page answers 403 for a country refusal and 503 with Retry-After for business hours and maintenance, with noindex, so crawlers and caches never store it as the page.
MySQL, MariaDB & PostgreSQL
The plugin follows whatever database your Vendure dbConnectionOptions use — no configuration. Verified against PostgreSQL 17; MySQL/MariaDB installs are unchanged.
Buy & activate from the admin
The 14-day evaluation starts by itself, with no card. Subscribe or buy lifetime from the plugin's admin page — checkout opens in a new tab and the key installs itself within a minute, renewals included. The same card shows your plan, first-charge date and a Manage billing link to the Stripe portal (update card, cancel, switch plan). Already have a key? Paste it into the same banner. No .env edit, no redeploy; environment keys still take precedence for infrastructure-as-code setups.
Weekly report, set-up checklist & dashboard widget
With a licence (or during the first 14 days), every Monday the plugin emails whoever runs the store a short report of what it did that week — real numbers from your own database, week-over-week, with the next set-up step to take — and the plugin page opens with a set-up checklist that hides itself once everything is done. Change the recipient, send a test or switch the report off from the plugin's Settings tab (needs the host's SMTP_* settings). If the licence lapses, the report stops and the checklist is hidden; their settings are kept. The dashboard widget (Dashboard → Add widget) is free and shows the plugin's recent numbers.
One-click in-app updates
When a new version ships, an update banner shows current → latest with a What's-new link to the changelog. "Update now" installs the registry-verified release via your project's own package manager (yarn/npm/pnpm auto-detected) and gracefully restarts under pm2/systemd. Disable with HULO_SELF_UPDATE=off.
Install
Four steps, five minutes.
Add the package
Or run the one-line installer that does steps 1–3 for you:
Prefer to do it by hand?
npm
yarn
pnpm
Register it
In your vendure-config.ts:
Compile the admin UI
Add the extension to your compileUiExtensions call so the plugin's page appears in the admin:
Run the migration
The plugin registers its own entity and, since 0.15, two Channel custom fields (geoBlockMaintenance, geoBlockEnforcePurchases); upgrading to 0.15 without synchronize needs this migration too (or add the GeoBlockChannelFields1763020800000 migration the package ships). Generate and run it like any other:
That's it. Restart Vendure and the plugin's page is in the admin with every feature on for 14 days — no card, no key. To keep it all on afterwards, open the page and click Subscribe (first charge when the 14 days end) — the key installs itself, no .env edit, no redeploy.
Free tier vs licensed
Try the whole thing, keep the core for free.
Every new install has every feature on for its first 14 days, with no card and no key. After that the free tier keeps working indefinitely, and a licence keeps the licensed features on. If a licence lapses, the licensed features stop and nothing is deleted.
Free tier (after the 14 days)
- Rules enforced, with 5 presets (Worldwide, UK only, EU, North America, Oceania)
- IPv4 and IPv6 allowlist, with Add my IP
- Business hours and per-channel maintenance windows, set in the admin
- Purchase enforcement: blocked visitors cannot buy (a hard block, opt-in)
- Verified crawler allowlist (reverse DNS)
- Country from a trusted CDN header or a local MaxMind file, with a country-source diagnostic
- 403 and 503 status codes on the block page
- The Settings tab
First 14 days + licensed
- All 37 region presets
- Subdivisions (US states, German Länder, UK countries and more)
- Soft block: a banner only, the shop stays open
- The audit log and stats
- The "what-if" simulator
- The weekly report and set-up checklist
HTTP endpoints
Every route exposed.
/geo-block/site-configPublic: channel rules the storefront polls/geo-block/checkPublic: per-request decision + reason (logged to the audit log with a licence)/geo-block/presetsPublic: the preset catalogue (37 entries)/geo-block/admin/channelsAdmin: list channels with current rules/geo-block/admin/saveAdmin: save a channel's rules/geo-block/admin/statsAdmin: block totals + top countries + daily series (licensed)/geo-block/admin/simulateAdmin: dry-run a visitor against current rules (licensed)/geo-block/admin/gcAdmin: prune old audit rows/geo-block/licence/statusAdmin: licence + evaluation + update status/geo-block/licence/activateAdmin: activate a licence key from the admin UI/geo-block/update/runAdmin: one-click in-app update + graceful restart/geo-block/digest/settingsAdmin: weekly report recipient, last/next send/geo-block/digest/send-testAdmin: email this week's report to you now/geo-block/setupAdmin: set-up checklist (what is still to do)/geo-block/widgetAdmin: headline figures for the dashboard widgetFAQ
Common questions.
How do I get a licence key?
Buy one on the web with Stripe Checkout: monthly licence for Geo-block, annual licence for Geo-block (two months free) or lifetime licence for Geo-block. You'll receive the JWT key by email. Paste it into the plugin's admin settings (Activate) — no redeploy — or set it as HULO_LICENCE_KEY_GEO_BLOCK in your .env if you prefer config-as-code; the env key wins when both are present.
Does it work without a key?
Yes. Every install runs with all premium features on for its first 14 days — no card, no licence key, nothing to configure — so you can judge it on your real traffic. After that it keeps working in the free tier. To keep them, click Subscribe on the plugin's admin page: the first charge is taken when the 14 days end (or 49 hours after checkout, if that is later), you can cancel any time before then, and the licence installs itself.
Which databases are supported?
MySQL, MariaDB and PostgreSQL (verified against PostgreSQL 17). The plugin follows your Vendure dbConnectionOptions automatically — there is nothing to configure.
How do updates work?
The plugin checks the npm registry daily. When a newer version exists, the admin dashboard shows an update banner with a What's-new link to the changelog and an "Update now" button that installs the registry-verified release via your own package manager and gracefully restarts under your process supervisor. Prefer manual control? Copy the install command instead, or set HULO_SELF_UPDATE=off.
Where is data stored?
In your Vendure database: the plugin keeps its data in its own tables there (added with a migration). Hulo Global never receives your customer data: the plugin sends our licence server only the licence check-ins and usage counts described under “Do the plugins call home?”.
Will it survive a Vendure upgrade?
It supports Vendure >=3.5.0 <4.0.0 (its peer dependency), and current releases are built and tested against Vendure 3.8.2 before they are published. A boot-time compatibility check emits a non-fatal warning if @vendure/core is outside that range, so upgrades to a future 3.x are safe to try. The 4.0 line will be tested and re-declared once its changelog lands.
Changelog
What's new.
Latest release: v0.16.0, 16 November 2026. Full changelog for Geo-block for Vendure
v0.16.0NewLatest
Improvement round. No migration; existing rules and settings behave as before.
Changed
- Block, closed and maintenance page redesigned in the shared HULO e-mail/page design: a centred 600px white card on
#f3f4f6, the channel logo or the newstoreNameabove a 3px accent bar, a 22px heading, the channel's message, an optional Continue button, the support e-mail and a reference footer. Accessible markup: one<main>landmark and one<h1>(the card was wrongly analertdialog), the logo's alt text is the store name, visible focus rings, AA contrast for text, links and the button. The page's colour is the newaccentColor(default#155dfc, was a fixed amber); per-reason page titles ("Closed", "Back soon").
Added
storeNameandaccentColorinit options, also editable in the Settings tab (SuperAdmin), with a "Preview it" link to the block page.
Fixed
javascript:/data:URLs from the plain Channel form. The block redirect and logo custom fields can be edited in Vendure's own Channel form, which does not validate them; ajavascript:redirect then reached the storefront helper (window.location.replace) and the soft-block banner link. Onlyhttp(s)URLs now leave the server (/check,/site-config, the block page), and the helper also refuses anything else.- The block page no longer echoes URL text.
?reason=was shown as the page reference (40 characters of attacker-chosen text on a store-branded page) and?country=accepted any 4 characters. Unknown reasons now show asgeo; the country must be a two-letter code. - Retry-After during the install-wide maintenance window now counts down to the window's end (it was always 3600 seconds unless the channel had its own window).
- The subdivision map saved over REST is bounded (ISO country keys, short codes, at most 250 × 200); it was stored unbounded and read on every
/check. - The page escapes single quotes as well.
Dependencies
- devDependencies to the latest minor/patch:
@nestjs/common^12.5.0,typeorm^0.3.31,typescript^5.9.3,nodemailer^6.10.1. Held: TypeScript 7, TypeORM 1.x and nodemailer 10 (majors; Vendure 3.x is on TypeORM 0.3 and the peer rangenodemailer >=6is unchanged).
v0.15.0New
Vendure ↔ WordPress parity wave. Database migration required unless you run synchronize: true: two new Channel custom fields (see the README, "Upgrading to 0.15"; the package ships GeoBlockChannelFields1763020800000). Default behaviour is unchanged: every new enforcement feature is opt-in.
Fixed
- IPv6 CIDR allowlists now match (B4). IPv6 entries were compared as text, so
2001:db8::/48never matched anything. Addresses and ranges are now compared as bytes for IPv4 and IPv6 (IPv4-mapped forms included), in the channel allowlist and the maintenance allowlist. The GraphQL save now validates IPs too (it accepted/0). - The free tier's 5-preset limit is enforced server-side (B4). It was UI-only: the unlicensed REST save, the GraphQL
geoBlockSaveChanneland the Channel custom field all accepted the 32 premium presets. All three now refuse a NEW premium preset without a licence or evaluation; presets saved while licensed are kept, so a lapsed install can still edit its channels. - Lockout refusal. Rules that would allow nobody (an empty allow-list) are saved switched off with a warning, on the admin page, REST and GraphQL, instead of blocking every visitor.
Added
- Server-side purchase enforcement (opt-in per channel,
geoBlockEnforcePurchases, default off, also for existing channels). For a visitor the rules fully block, Vendure refusesaddItemToOrder/ quantity increases (OrderInterceptor) and the move toArrangingPayment(OrderProcess). A soft block stays a banner. Fails open: unknown country, Admin API, lookup errors and exceptions all allow; payments under way are never touched; crawlers get no purchase exemption. Free (hard block). - Business hours tab in the admin (days, hours, time zone, outside action, message), saved through
POST /geo-block/admin/save(schedule), validated server-side. - Per-channel maintenance window (
geoBlockMaintenance) with its own tab: start/end (≤ 31 days), extra IPs, message. ThemaintenanceWindowinit option still covers every channel. - Local MaxMind fallback (
maxmindDbPath): a MaxMind-format database already on the server is read when no trusted CDN header gives the country. Self-contained reader (cross-checked againstmmdb-libon GeoLite2-City), re-read when the file changes, never downloaded, private addresses never looked up; a missing file means "unknown" (allowed). - Reverse-DNS verification for Googlebot / Bingbot (
verifyBots, or the Settings tab): reverse + forward-confirmed DNS with the server's resolver, cached, 2 s timeout. - Add my IP (
POST /geo-block/admin/add-my-ip). - Settings tab (
GET/POST /geo-block/admin/settings, SuperAdmin to change): init options are the defaults; crawler mode/custom list,verifyBots, support e-mail, rate limit, helper cache age and audit-IP hashing can be overridden (stored inhulo_plugin_prefs); security options shown read-only. - Country-source diagnostic (
GET /geo-block/admin/diagnostic, Settings tab): your IP, country, source (CDN header / MaxMind file / none), trusted-proxy state and what to fix. - Status codes. The HTML block page answers 403 (geo) or 503 +
Retry-After(business hours, maintenance) withX-Robots-Tag: noindex./checkkeeps 200 JSON;?status=1opts into 403/503. - The simulator also reports the full pipeline (hours, maintenance) and the purchase verdict.
Changed
- Weekly report and set-up checklist are premium (licence or evaluation). On the free tier the report is not sent (send-test and preview answer 402) and
GET /geo-block/setupreturns no items; settings are kept and both resume with a licence.PREMIUM_FEATURESupdated. - The admin page marks the simulator and soft-block as premium and no longer says a soft block hides the checkout (it is a banner only).
- README: free tier enforces; simulator, audit log, report and checklist are premium; soft-block wording; MaxMind is a local-file fallback; no-card evaluation; licence AGPL-3.0-only + licence key.
v0.14.6NewSecurity
- Security Admin REST routes refuse a Shop-API session on Vendure 3.8+. Vendure 3.8 binds every session to the API it was created on and refuses Shop-API sessions on the Admin API (GHSA-5fpx-9m35-w745), but it does not check REST routes added by plugins: an administrator's storefront session still carried their admin permissions into the Geo Block admin REST routes (rules, IP allowlists, simulate, licence). Those routes now also require a session created on the Admin API (
isAdminApiSessionfrom the licence SDK 0.15.6, the same rule as Vendure's own AuthGuard). The admin UI is unaffected; administrators logged in before the 3.8 upgrade log in again once, as Vendure already requires. No change on Vendure 3.5 to 3.7. Covered by a new e2e test.
Compatibility
- Tested with Vendure 3.8.2 (NestJS 12,
@nestjs/graphql14, Apollo Server 5), as well as 3.5 to 3.7. The peer range stays@vendure/core >=3.5.0 <4.0.0; nothing here needs 3.8. - Requires
@huloglobal/vendure-licence-sdk^0.15.6.
v0.14.5New
Package metadata
- The
licensefield is nowAGPL-3.0-only, matchingLICENSE, which grants the GNU Affero General Public License version 3 (it saidAGPL-3.0-or-later). Published npm builds remain under the separate commercial licence described inLICENSE. No code changes.
v0.14.4New
Fixed
- PostgreSQL. The plugin now requires licence SDK
^0.15.4. With 0.15.3 or older on Postgres, the first weekly report was skipped (it started a week late), and pruning old block events (POST /geo-block/admin/gc) answereddeleted: 2whatever it removed. MySQL and MariaDB were not affected. - PostgreSQL: a licence key activated in the admin is now stored. The plugin's licence store left out the conflict column that the Postgres upsert needs, so saving a key failed. Pasting a key into the admin applied it, answered with a server error and did not store it, so the plugin was unlicensed again after a restart. A key bought from the admin, which installs itself, was not stored either. MySQL and MariaDB were not affected.
Package metadata
homepageis now the product page, https://huloglobal.com/vendure-plugins/geo-block/, instead of the GitHub repository.- A shorter
descriptionthat npm shows in full (npm cuts descriptions at 255 characters), and keywords for country blocking, the IP allowlist and maintenance mode.
v0.14.3New
Documentation
- The README now shows the plugin logo, hosted on huloglobal.com so it displays on npm and GitHub alike, linking to the product page. No code changes.
v0.14.2NewSecurity
Security and reliability review.
- Security Country headers are no longer believed from any client.
CF-IPCountry,cf-region-code,X-Akamai-EdgescapeandX-Country-Codeare read only when the request reached Vendure through a proxy trusted by Expresstrust proxy(VendureapiOptions.trustProxy). New optiontrustedCountryHeadersnames exactly which headers to trust instead (set it to your edge's header, e.g.['x-country-code']behind Fastly, so a client cannot outrank it with its ownCF-IPCountry;[]ignores them all). When Cloudflare reportsXX/T1the country is unknown — a client-addedX-Country-Codeno longer fills the gap. Behaviour change: a host that sits behind a proxy without settingtrustProxymust set it (ortrustedCountryHeaders) for country rules to apply. - Security
trustedIpHeaders: ['x-forwarded-for']now takes the right-most hop that is not a trusted proxy, not the client-written left-most one (which let anyone claim an allow-listed office IP). - Security Admin routes are channel-scoped. The REST routes (
admin/channels,admin/save,admin/simulate,admin/stats,admin/gc) and the GraphQLgeoBlockChannels,geoBlockSaveChannel,geoBlockSimulate,geoBlockStatschecked the permission only in the request's own channel, then acted on whichever channel the body named — an administrator of one channel could read every channel's token and IP allowlist and rewrite (or switch off) another channel's rules. They now require the permission in the channel acted on, and lists show only those channels. - Security
/geo-block/blockedignores?msg=: the message is the channel's own block message, schedule message or the default for the reason. Before, anyone could craft a link rendering arbitrary text under the store's logo.
Fixed
/check,/site-config(with a channel token),/blockedand the simulator failed with an SQL error on every host that does not itself define the Channel custom fieldsshowCompanyNumber/businessCompanyNumber, so the storefront helper failed open and nothing was ever blocked. Those columns are now selected only when the host defines them (companyDatastays as before where they exist).- GraphQL
geoBlockChannels/geoBlockSimulateread the JSON-stored lists as comma-separated text (["GB"/"FR"]), so the simulator gave wrong verdicts and ignored region presets; they now resolve the rules exactly as/checkdoes. - The save routes answered "channel not found" on SQLite although the update had been applied.
- E2E runs point the licence SDK at a local stub instead of the live licence server.
v0.14.1
Changed
- Every install now gets a 14-day evaluation with all features on and no card (granted by the HULO licence server). The licence banner's buttons read Subscribe: during the evaluation the first charge falls on the day it ends, so there is no second free trial.
v0.14.0
Merchant engagement pass (licence-sdk 0.15.0).
Added
- Weekly report. Every Monday at 08:00 (server time) the worker emails what Geo Block did last week — hard blocks, soft blocks and distinct addresses blocked, week-on-week — plus the next set-up step and the licence lifecycle notice. Sent through the host's
SMTP_*environment (nodemaileris an optional peer dependency); off when SMTP is unset. Recipient: the configuredsupportEmail, else the licence customer, else the trial-reminder address. Settings, "Send me a test" and "Preview" live on the admin page (GET/POST /geo-block/digest/settings,POST /geo-block/digest/send-test,GET /geo-block/digest/preview). Preferences are stored in the sharedhulo_plugin_prefstable. - Set-up checklist on the admin landing page (
GET /geo-block/setup): rules set on a channel, block page customised, own IP allow-listed, simulation run. Real checks against the channel rows; "Hide" is remembered in the browser until a done item comes undone. - Dashboard widget "Geo Block" (Dashboard → Add widget): blocked, soft-blocked and unique IPs over the last 7 days, the lifecycle notice and a link to the page (
GET /geo-block/widget). - Admin navigation: Settings → Geo Block (
GeoBlockNavModule, shared). - Usage numbers with the heartbeat. The 30-day
requestsBlocked,requestsSoftBlockedanduniqueIpsBlockedcounts already sent with the evaluation ping now also go with the daily heartbeat after purchase, so renewal emails can say what the plugin did. POST /geo-block/eval/remind-me— "Email me before it ends" on the trial banner, proxied to the licence server; the address is kept as the report fallback recipient.GET /geo-block/licence/statusgainsnotice(trial/key lifecycle sentence),premiumFeaturesandrecentStats(top 30-day figures).- Hero tile "Blocked · last 7 days" above the tabs, so the headline figure is visible without opening Stats.
Changed
- One update banner instead of two; "Dismiss" is remembered per version.
- Licensed banner shows "renews automatically — current key valid until <date>" for subscriptions and an amber notice in the last two weeks of a key or trial. Trial and free banners list the premium features and a "So far: …" line from real figures.
- A 402 (premium feature) from Stats shows an unlock chip in the tab; other 402s and
licence-requiredbodies produce one consistent toast. @huloglobal/vendure-licence-sdk^0.15.0.
v0.13.3
Follow-up to the 0.13.2 hardening pass.
Added
- Per-install audit-IP salt. When
ipSaltis unset, a random salt is generated once at boot and stored inhulo_licence_store(keyvendure-plugin-geo-block:ipsalt, first writer wins so server and worker agree) instead of hashing every install's audit IPs with the same public constant. A boot warning says a generated salt is in use. - Live allow-list preview.
GET /geo-block/presetsnow includes each preset'scountries; the admin page resolves the allow-list, the status sentence and the lockout warning in the browser from the form state (ui/resolve-allowed.ts, unit-tested against the server resolver) instead of the list the server computed at load time. - Postgres corpus test (
src/pg-corpus.test.ts, runs whenHULO_PG_URLis set): every raw SQL statement insrc/is translated by the dialect adapter and executed against PostgreSQL 17 with TypeORM-quoted stand-ins forchannelandgeo_block_event. presetCountries(key)is exported.
Fixed
- Unlicensed
site-configcontract. The publicsite-confignever applied the free-tier gate that/checkapplied (mode=block, no subdivisions), so a storefront cachingsite-configcould render the soft-block banner while/checkblocked. The gate now lives inbuildConfig, sosite-config,checkand the simulator agree. The README and e2e no longer claim the free tier returnsenabled:false.
v0.13.2Security
Reliability and security pass — no new features.
- Security Client IP could be forged.
/checkand the rate limiter trustedX-Forwarded-For,CF-Connecting-IP,True-Client-IPandX-Real-IPfrom any client, so anyone could send an allow-listed office address and walk through the block. The visitor address is now Express'sreq.ip(honouring the host'strust proxy); vendor headers are only read when listed in the newtrustedIpHeadersoption. IPv4-mapped IPv6 addresses (::ffff:…) now match IPv4 allowlist entries; matching is case-insensitive. - Security
?country=/?region=overrides must be plain ISO codes and, when asigningSecretis set, both must be signed (regionSig). - Security Self-update and licence activate/deactivate/purchase/portal require SuperAdmin;
admin/statsauthenticates before revealing the tier. - Security Save validation: bounded lists, ISO country codes, known preset keys, parseable IPs/CIDRs (prefix ≥ 8), http(s)-only redirect and logo URLs; rejected values are returned in the response.
Fixed
- Storefront helper blocked cross-origin.
hulo-geo.jscarriedCross-Origin-Resource-Policy: same-origin, so a storefront on a different origin than the API could not load it. It is nowcross-origin. - Postgres. Channel custom-field columns and the audit table's
createdAt/channelIdare quoted in raw SQL;SUM(boolean)replaced withSUM(CASE …); the enabled flag is bound as a boolean. - GraphQL admin API queried columns that do not exist (
customFields_huloGeoBlock…);geoBlockChannels,geoBlockSaveChannelandgeoBlockSimulatenow use the real columns and the same JSON-array storage as the REST routes. maintenanceWindow.allowedIpsis honoured; the simulator applies subdivisions and reports schedule, bot and maintenance verdicts like enforcement does.- Schedules typed with day numbers as strings no longer block every day; the midnight hour can no longer render as
24:xx(fail-open).
Changed
- Audit rows are written with
insertafter the response (no longer awaited);urlnow records the referring page instead of the API URL. - Retention defaults to 90 days / 500 000 rows (
retention: falseto keep everything); a(channelId, createdAt)index is declared ongeo_block_event(run your migrations). - Channel rules are cached for 10 s in the server process;
/checkanswersCache-Control: no-store;/presetsand/subdivisionsare cacheable for an hour. - Bootstrap side effects (retention sweeper, claim poller) run on the server only.
- Admin UI: first-run "Worldwide" writes the canonical key (no false lockout warning), the update banner is no longer shown twice, the copy button copies a real
@, timers are cleared on destroy.
v0.13.1
Changed
- Branding. The bundled
hulo-global-logo.svgis now the HG wordmark on the HULO black rounded square (the same mark as the huloglobal.com header), with explicit-lightand-darkvariants alongside the auto-switching default.
v0.13.0
Added
- Licence & billing card in the admin. Always visible: the current state (free tier, free trial with first-charge date, monthly/annual subscription, lifetime, or master licence) with the actions that apply — start the 14-day free trial or subscribe, buy lifetime, Manage billing (Stripe customer portal: update card, cancel, switch plan) and Upgrade to lifetime (the old subscription stops billing at the end of its paid period). Requires licence SDK ^0.14.0.
v0.12.1
Changed
- The 14-day free trial is now card-backed. Unlicensed installs run in the free tier; start the trial from the admin banner (monthly or annual → Start 14-day free trial) — Stripe collects a card, nothing is charged until day 15, cancel any time before then, one trial per customer — and the licence installs itself within a minute. The automatic no-card evaluation window is retired (licence SDK ^0.13.0).
v0.12.0
Added
- Buy licence from the admin. The evaluation / free-tier banner now has a plan picker and a Buy licence button: checkout opens in a new tab and, once payment completes, the licence installs itself — no email round-trip, no
.envedit, no restart. Renewed subscription keys are picked up automatically too. New admin endpointslicence/purchase-linkandlicence/claim-status.
Changed
- Requires
@huloglobal/vendure-licence-sdk^0.12.0. - The 7-day card trial at checkout has been retired: every install already gets the 14-day no-card evaluation, and paid plans now bill from day one.
v0.11.2
Changed
- Pricing. Geo-block is now £4.95/month, £49.50/year or £99 lifetime (was £9.95 / £99.50 / £199). README updated; the 14-day evaluation is unchanged.
v0.11.1
Changed
- Licence SDK ^0.11.0. Master licences (one key that activates every HULO plugin) and hardware-bound keys are now accepted by the runtime licence check.
- Branding. Refreshed HULO Global logo (inline HG monogram) in the admin UI.
v0.11.0
Added
- PostgreSQL support. All of the plugin's SQL now runs on Postgres as well as MySQL/MariaDB — the licence SDK's new dialect adapter translates queries transparently at runtime, so no configuration is needed: the plugin follows whatever database your Vendure
dbConnectionOptionsuse. Verified against PostgreSQL 17. MySQL/MariaDB installs are unaffected (byte-identical passthrough).
v0.10.1
Changed
- The update banner's "What's new" link now opens the plugin's changelog page on huloglobal.com, so you can read exactly what a release contains before updating.
v0.10.0
Added
- One-click in-app updates. The update banner now has an "Update now" button: the plugin installs the new version via your project's own package manager (yarn/npm/pnpm auto-detected), verifies it landed, and gracefully restarts under your process supervisor (pm2/systemd). Admin-only; the target version is verified against the npm registry; a failed install never restarts anything. Disable with HULO_SELF_UPDATE=off; force restart without a detected supervisor with HULO_SELF_UPDATE=force. Note: a separate worker process picks the update up on its next restart, and the admin UI itself refreshes after your next admin build.
v0.9.1
Added
- Update notifications in the admin UI. When a newer version is on npm, a dismissible banner shows current → latest with a copy-ready install command and a link to what's new. (Update data comes from the existing daily registry check — no new network calls.)
v0.9.0
Added
- In-admin licence activation. A banner on the admin page shows the evaluation countdown (or free-tier state) with a paste-your-key box: the key is verified with the exact boot-time checks and activates instantly — no .env edit, no redeploy. Persisted in the shared hulo_licence_store table and restored on boot; env/init keys always take precedence. New licence/status, licence/activate and licence/deactivate admin endpoints.
v0.8.0
Added
- 14-day full-featured evaluation. Unlicensed installs now get the complete feature set for 14 days instead of the restricted free tier. Premium blocking features now also run during the evaluation window. The clock is anchored server-side (a hashed instance id — no personal data), so reinstalling does not restart it, and it fails open: if the licence server is unreachable the plugin keeps running fully. After the window the plugin drops to the free tier; all configuration is kept and reactivates instantly with a key.
v0.7.4
Fixed
- Buttons rendered unstyled in the admin. The page borrowed Clarity button classes (
btn btn-secondaryetc.) from the admin shell, but the built admin CSS defines.btnonly contextually and.btn-secondarynot at all — "+ Add" and friends rendered as bare native buttons. Every control is now styled by the component itself (.gbtnsystem). - Unreadable muted text. Secondary text leaned on
--color-component-color-200/300, which the admin never defines, so hardcoded slate fallbacks applied in both themes — unreadable on dark surfaces. Replaced by per-theme ink tokens. - Invisible control boundaries. The admin border tokens fail WCAG 1.4.11 in both themes (light
#bfc3cc≈ 1.7:1; dark border-200 is darker than the surface, 1.01:1). Inputs/buttons/switch now use a dedicated--gb-ui-borderat ≥ 3:1 per theme.
Added
- Accessibility, verified not assumed.
scripts/contrast-check.pysimulates the shippedcolor-mix()tokens against the real admin theme values and checks every text/surface pair — 40/40 WCAG AA pass (≥ 4.5:1 text, ≥ 3:1 UI boundaries) in light and dark. - Enforcement toggle switch (
role="switch", keyboard + focus ring) replaces the ON/OFF pill + button pair. - ARIA tabs (
role="tablist"/tab,aria-selected), labelled chip remove buttons,aria-expandedon collapsibles,:focus-visiblerings on every control,prefers-reduced-motionsupport. - Sticky save bar — stays in view, shows "Unsaved changes" with an amber accent when dirty, and disables Save/Discard when clean.
v0.7.3
Fixed
- Dark mode. All semantic surfaces (success/warning/danger/info tints) are derived from the live theme variables with
color-mix()instead of hardcoded light-mode pastels, which produced light-text-on- cream unreadables in the dark theme (worst: selected preset cards).
Changed
- Active tab restyled to brand amber; IP allowlist tab shows a bypass-IP count badge; save bar highlights when there are unsaved changes.
v0.7.2
Changed
- Admin page redesign on the unified HULO admin design system: brand hero with help drawer, plain-English status sentence describing exactly what the current rules do (with lockout warning), first-run panel, tabbed layout (Rules / Block page / IP allowlist / Simulate / Stats), KPI tiles and mini-bar country table on Stats.
v0.7.0
Added
- Bot / crawler allowlist. New plugin option
botAllowlist, defaulting to'strict'— matches every well-known SEO + social crawler (Googlebot, Bingbot, DuckDuckBot, Baidu, Yandex, AppleBot, Slurp, facebookexternalhit, Twitterbot, LinkedInBot, Slackbot, WhatsApp, Discord, Telegram, Pinterest, Reddit + more). Ships crawler-safe by default so restrictive geo rules don't silently drop search-engine crawls and de-index the site. Also accepts'permissive'(any UA self-identifying as bot / crawler / spider),false(no allowlist — use only when a WAF handles bots upstream), or a custom pattern array of strings + regexes. New audit decisionbot-allowlist. - Business-hours schedule. New per-channel custom field
geoBlockSchedule— a JSON object withtimezone,days,from,to, andoutsideAction(block/soft/allow). Recurring weekly window per channel; outside the window the configured action fires. Handles overnight windows and DST viaIntl.DateTimeFormat. New audit decisionschedule. IP + bot allowlists still bypass so ops and crawlers never see "closed for orders". - Storefront drop-in helper JS at
GET /geo-block/hulo-geo.js. One<script src>withdata-channel-token="…"and the store gets geo-blocking with zero custom code. Vanilla JS, no dependencies, fails open on network error, ~2 KB minified. Optional attrs:data-redirect,data-timeout-ms,data-preview. Cachedpublic, max-age=300, stale-while-revalidate=1200(configurable via new plugin optionstorefrontHelperMaxAgeSec). - Branded block page at
GET /geo-block/blocked?t=…&reason=…. Self-contained HTML — inline CSS, no deps, HULO amber-on-navy identity. Renders channelblockLogoUrl, message, optional redirect CTA, and support email (new plugin optionsupportEmail). Returns JSON whenAccept: application/json. Rate-limited. - HULO brand logo shipped as
logo.svgin the package root (globe + amber block-slash on the navy HULO frame).
Changed
/geo-block/checknow runs the bot allowlist and business-hours schedule checks alongside the existing IP allowlist + maintenance window checks. Precedence: IP allowlist → bot allowlist → schedule → maintenance → country / region rules.loadChannelRownow includesgeoBlockScheduleand the previously- missinggeoBlockAllowedSubdivisionsfield, so subdivision rules now round-trip correctly through the storefront/checkpath.
Fixed
- Subdivision map (
geoBlockAllowedSubdivisions) was defined as a channel custom field but never read into the runtime config on/check— the storefront verdict ignored it. Now honoured end-to-end (on licensed installs — unlicensed still forces the map to empty per the 0.4 tier gates).
v0.6.0
Added
- Boot-time compatibility check via the new SDK helper
warnIfIncompatibleVendure(). Logs a non-fatal warning when the runtime@vendure/coreversion is outside the tested range. Silent when inside; fail-open on unparseable versions.
Changed
- Peer dep on
@vendure/coretightened to>=3.5.0 <4.0.0— Vendure 3.5, 3.6 and 3.7 are all covered. Anything under 3.5 has never been tested; anything from 4.0 upwards is deferred until the changelog is reviewed. - Uses
@huloglobal/vendure-licence-sdk@^0.6.0.
v0.5.0
Added
- Vendure Admin API GraphQL extensions. Operator endpoints are now first-class GraphQL queries and mutations alongside the existing REST admin endpoints:
geoBlockPresets,geoBlockChannels,geoBlockStats(paid),geoBlockSaveChannel,geoBlockSimulate(paid). - Storefront paths (
/geo-block/check,/geo-block/site-config) stay REST — they're anonymous, high-frequency, cacheable at the edge, and GraphQL was never the right shape for them.
v0.4.0
Added
- Tier-gating on every premium feature via the SDK's
isLicensed()helper. Unlicensed installs get:- only the 5 free-tier region presets (Worldwide, UK, EU, North America, Oceania) instead of all 37;
modeforced toblock— no soft-block;- no audit log persistence;
- no subdivision map honoured;
- 402 on the stats + simulator endpoints.
Commenting out a boot check no longer unlocks anything — the gates are enforced at each call site.
- Anti-tamper heartbeat via the SDK. Anonymous daily fingerprint of the embedded public key + verifier source. No personal data.
Changed
- Relicensed the GitHub source to AGPL-3.0. Published npm builds remain under the commercial licence documented at <https://huloglobal.com/legal/terms/>.
- npm builds now include Sigstore provenance attestations.
v0.3.2
Changed
- 44px minimum tap targets on every interactive element in the admin UI.
v0.3.1
Changed
- Comprehensive README refresh — documents the full v0.3 feature set including the 37 region presets, generic subdivisions catalogue, security primitives, and opt-in retention.
v0.3.0
Added
- Generic country-subdivisions schema. New channel custom field
geoBlockAllowedSubdivisionsstoring a JSON map{ "US": ["CA","NY"], "DE": ["BY"] }. Storefront enforcement checks both the new map and the legacy GB-only field. - Curated subdivision catalogue for 11 countries (GB, US, CA, AU, DE, IT, FR, ES, IN, BR, MX) — 200+ subdivisions, surfaced at
GET /geo-block/subdivisions. - Admin UI: subdivisions hidden behind a toggle by default; pick any country to apply a subdivision filter.
- Rate limiter (120 requests / 60s default) on
/site-config+/check. - HMAC-gated
?country=override on/check(signingSecret). - Hashed audit IPs by default (
hashAuditIps,ipSalt). - Security headers on every response.
- Opt-in retention sweeper via
options.retention.
v0.2.3
Changed
- Mobile-friendly admin UI — channel row + tab bar stack and scroll horizontally, preset and mode grids collapse to single column.
v0.2.2
Changed
- Republish targeting
@huloglobal/vendure-licence-sdk@^0.2.0.
v0.2.1
Added
UpdateCheckerintegration —/geo-block/statusendpoint returns version + update info; admin banner appears on new releases.
v0.2.0
Added
- 37 region presets (up from 8) — EU, EEA, EFTA, Schengen, Nordic, Baltic, Benelux, DACH, Iberia, Balkans, GCC, MENA, ASEAN, APAC, East Asia, South Asia, LATAM, Central America, Caribbean, Africa, G7, G20, BRICS, OECD, NATO, Five Eyes, Commonwealth, English-speaking, and more.
- Soft-block mode — per-channel
modefield (blockorsoft). Soft mode renders the storefront with a "we don't ship here" banner instead of hiding it. - IP allowlist with IPv4 CIDR — per-channel list of IPs / ranges that bypass every rule. For offices, oncall, payment processors.
- Audit log — new
GeoBlockEvententity records every block decision (country, region, IP, UA, reason). - Stats endpoint —
GET /geo-block/admin/statsreturns block totals, top blocked countries, daily series and reason breakdown. - Simulator endpoint —
POST /geo-block/admin/simulatedry-runs a hypothetical visitor against current rules without persisting anything. - Custom block page — per-channel
blockMessage,blockRedirectUrl,blockLogoUrlfields. - Scheduled maintenance window — plugin option for a one-shot date-range lockdown (every visitor blocked except the IP allowlist).
- Per-request
/geo-block/checkendpoint — visitors can be checked on the fly with logging to the audit table. - Presets catalogue endpoint —
GET /geo-block/presetslists every preset with metadata (kind, description, country count). - Redesigned admin UI: five tabs (Rules / Block page / IP allowlist / Simulate / Stats) with filterable preset picker, soft/hard mode toggle and a live simulator.
Changed
- Admin UI now calls
/geo-block/admin/*directly (no/ees/prefix). isAllowed()andipMatchesAny()exported for downstream use.
v0.1.0
Added
GeoBlockPluginregistering five Channel customFields per channel (enable toggle, region presets, allowed countries, blocked countries, UK region sub-filter).- Public
/geo-block/site-configendpoint serving a flat resolved allow-list per channel. - Admin endpoints
/geo-block/admin/channelsand/geo-block/admin/save. - Dedicated admin UI page with mode picker, region preset cards, chip pickers, live preview of the resolved allow-list.
resolveAllowedCountriesexported as a pure helper.- Licence verification via
@huloglobal/vendure-licence-sdkwith revocation polling.
Ready to ship?
Install in five minutes, run the trial on real traffic, keep it if it earns its place.