feat: production routing support for subdomain and custom domain modes
Some checks failed
Some checks failed
Double-mount store routes at /store/* and /store/{store_code}/* so the
same handlers work in dev path-based, prod path-based, prod subdomain,
and prod custom-domain modes. Wire StorePlatform.custom_subdomain into
StoreContextMiddleware for per-platform subdomain overrides. Add admin
custom-domain management UI, fix stale /shop/ reset link, add
/merchants/ to reserved paths, and server-render window.STORE_CODE for
JS that previously parsed the URL.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -178,10 +178,11 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Get store code from URL
|
||||
* Get store code from server-rendered value or URL fallback
|
||||
* @returns {string|null}
|
||||
*/
|
||||
getStoreCode() {
|
||||
if (window.STORE_CODE) return window.STORE_CODE;
|
||||
const path = window.location.pathname;
|
||||
const segments = path.split('/').filter(Boolean);
|
||||
// Direct: /store/{code}/...
|
||||
|
||||
@@ -139,9 +139,10 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Get store code from URL
|
||||
* Get store code from server-rendered value or URL fallback
|
||||
*/
|
||||
getStoreCode() {
|
||||
if (window.STORE_CODE) return window.STORE_CODE;
|
||||
const path = window.location.pathname;
|
||||
const segments = path.split('/').filter(Boolean);
|
||||
if (segments[0] === 'store' && segments[1]) {
|
||||
|
||||
Reference in New Issue
Block a user