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:
@@ -56,6 +56,7 @@
|
||||
|
||||
<!-- 1.5: Store Configuration (resolved via PlatformSettingsService) -->
|
||||
<script>
|
||||
window.STORE_CODE = '{{ store_code | default("") }}';
|
||||
window.STORE_CONFIG = {
|
||||
locale: '{{ storefront_locale }}',
|
||||
currency: '{{ storefront_currency }}',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="javascript:history.back()" class="btn btn-primary">Go Back</a>
|
||||
<a href="/store/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
</div>
|
||||
|
||||
{% if show_debug %}
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Need help? <a href="/store/support">Contact Support</a>
|
||||
Need help? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<div class="error-code">Error Code: {{ error_code }}</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/store/login" class="btn btn-primary">Log In</a>
|
||||
<a href="/store/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/login" class="btn btn-primary">Log In</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
</div>
|
||||
|
||||
{% if show_debug %}
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Having login issues? <a href="/store/support">Contact Support</a>
|
||||
Having login issues? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="error-code">Error Code: {{ error_code }}</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/store/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="javascript:history.back()" class="btn btn-secondary">Go Back</a>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Need elevated permissions? <a href="/store/support">Contact Your Manager</a>
|
||||
Need elevated permissions? <a href="/store/{{ store_code }}/support">Contact Your Manager</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="error-code">Error Code: {{ error_code }}</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/store/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="javascript:history.back()" class="btn btn-secondary">Go Back</a>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Can't find what you're looking for? <a href="/store/support">Contact Support</a>
|
||||
Can't find what you're looking for? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="javascript:history.back()" class="btn btn-primary">Go Back</a>
|
||||
<a href="/store/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
</div>
|
||||
|
||||
{% if show_debug %}
|
||||
@@ -53,6 +53,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Still having issues? <a href="/store/support">Contact Support</a>
|
||||
Still having issues? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="javascript:location.reload()" class="btn btn-primary">Retry</a>
|
||||
<a href="/store/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
</div>
|
||||
|
||||
{% if show_debug %}
|
||||
@@ -47,6 +47,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Experiencing persistent rate limits? <a href="/store/support">Contact Support</a>
|
||||
Experiencing persistent rate limits? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="error-code">Error Code: {{ error_code }}</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/store/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="javascript:location.reload()" class="btn btn-secondary">Retry</a>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Issue persisting? <a href="/store/support">Report this error</a>
|
||||
Issue persisting? <a href="/store/{{ store_code }}/support">Report this error</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="javascript:location.reload()" class="btn btn-primary">Retry</a>
|
||||
<a href="/store/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-secondary">Dashboard</a>
|
||||
</div>
|
||||
|
||||
{% if show_debug %}
|
||||
@@ -39,6 +39,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Service unavailable for extended period? <a href="/store/support">Check Status</a>
|
||||
Service unavailable for extended period? <a href="/store/{{ store_code }}/support">Check Status</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
{% block action_buttons %}
|
||||
<a href="/store/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="javascript:history.back()" class="btn btn-secondary">Go Back</a>
|
||||
{% endblock %}
|
||||
</div>
|
||||
@@ -214,10 +214,10 @@
|
||||
|
||||
<div class="support-link">
|
||||
{% block support_link %}
|
||||
Need help? <a href="/store/support">Contact Store Support</a>
|
||||
Need help? <a href="/store/{{ store_code }}/support">Contact Store Support</a>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="error-code">Error Code: {{ error_code }}</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/store/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="/store/{{ store_code }}/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<a href="javascript:history.back()" class="btn btn-secondary">Go Back</a>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="support-link">
|
||||
Need assistance? <a href="/store/support">Contact Support</a>
|
||||
Need assistance? <a href="/store/{{ store_code }}/support">Contact Support</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user