← back to Dw Theme Boost Fix
repoint Boost SD api endpoints staging->production in config interceptor
780c3626d1357a7fba5d7dafe699bcabab58cfc3 · 2026-07-13 08:31:17 -0700 · Steve Abrams
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Files touched
M snippets/boost-infinite-override.liquid
Diff
commit 780c3626d1357a7fba5d7dafe699bcabab58cfc3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 13 08:31:17 2026 -0700
repoint Boost SD api endpoints staging->production in config interceptor
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---
snippets/boost-infinite-override.liquid | 51 +++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/snippets/boost-infinite-override.liquid b/snippets/boost-infinite-override.liquid
index 0593e4d..3383e5c 100644
--- a/snippets/boost-infinite-override.liquid
+++ b/snippets/boost-infinite-override.liquid
@@ -22,6 +22,27 @@
3. Short rAF/interval poll re-applies in case Boost replaces the object.
4. Patch every pagination knob found: generalSettings.* and
additionalElements.pagination.* across all surfaces.
+
+ ----------------------------------------------------------------------------
+ ENDPOINT REPOINT (DW, 2026-07-13 — customer-facing regression fix)
+ Boost's app-embed config snippet ("app snippet: config", rendered before
+ </body> via the boost-sd app embed in settings_data.json) hardcodes the
+ boostSDAppConfig.api URLs to https://staging.bc-solutions.net/... which
+ returns 403 on every call → empty filter trees, dead search page, broken
+ infinite scroll. The snippet has a production self-correction block keyed on
+ themeInfo env, but at runtime the staging values still win (the final
+ `merge(boostSDAppConfig, window.boostSDAppConfig)` lets a pre-existing
+ window config's keys — populated with the staging api — take precedence).
+ We cannot edit the app embed's source, so patchApi() below rewrites any
+ staging bc-solutions endpoint to the VERIFIED production values every time
+ the config passes through this interceptor. TARGETED: only values containing
+ 'staging.bc-solutions.net' / 'boost-cdn-staging' are rewritten, so if Boost
+ fixes this upstream the patch becomes a no-op. Production values verified
+ 2026-07-13 against services.mybcapps.com (filter: 75,278 products;
+ search 'grasscloth': 8,203; suggest 'milano': 85) and against Boost's own
+ env==='production' Object.assign block in the same app snippet
+ (recommendUrl /discovery/recommend, analyticsUrl lambda.mybcapps.com/e,
+ cdn boost-cdn-prod.bc-solutions.net).
============================================================================
{% endcomment %}
<script>
@@ -32,6 +53,35 @@
var TARGET = 'infinite_scroll';
+ // Verified production Boost SD endpoints for this shop (2026-07-13).
+ var PROD_API = {
+ filterUrl: 'https://services.mybcapps.com/bc-sf-filter/filter',
+ searchUrl: 'https://services.mybcapps.com/bc-sf-filter/search',
+ suggestionUrl: 'https://services.mybcapps.com/bc-sf-filter/search/suggest',
+ productsUrl: 'https://services.mybcapps.com/bc-sf-filter/search/products',
+ recommendUrl: 'https://services.mybcapps.com/discovery/recommend',
+ analyticsUrl: 'https://lambda.mybcapps.com/e',
+ cdn: 'https://boost-cdn-prod.bc-solutions.net'
+ };
+
+ // Rewrite ONLY staging bc-solutions endpoints to production. Anything that
+ // already points at a non-staging host is left untouched, so an upstream
+ // Boost fix (or an intentional custom endpoint) is never clobbered.
+ function isStaging(v) {
+ return typeof v === 'string' &&
+ (v.indexOf('staging.bc-solutions.net') !== -1 ||
+ v.indexOf('boost-cdn-staging') !== -1);
+ }
+ function patchApi(api) {
+ if (!api || typeof api !== 'object') return;
+ for (var k in PROD_API) {
+ if (!Object.prototype.hasOwnProperty.call(PROD_API, k)) continue;
+ try {
+ if (isStaging(api[k])) api[k] = PROD_API[k];
+ } catch (e) {}
+ }
+ }
+
// Recursively rewrite any "paginationType" key to infinite_scroll, plus the
// common Boost shapes (generalSettings + additionalElements.pagination).
// `seen` guards against cyclic / shared references so a self-referential
@@ -65,6 +115,7 @@
// cycle-safe — known surfaces get a full-depth targeted walk, then the
// catch-all root walk skips anything already visited (schema-drift safe).
var seen = [];
+ patchApi(cfg.api); // endpoint repoint — staging → production (2026-07-13)
if (cfg.generalSettings) patchObj(cfg.generalSettings, 0, seen);
if (cfg.additionalElements) patchObj(cfg.additionalElements, 0, seen);
patchObj(cfg, 0, seen);
← 89bae7d snapshot live theme before boost fix
·
back to Dw Theme Boost Fix
·
add Playwright interceptor race test (PASS against live) + e 29a6258 →