Fix admin URL for local core: add 'admin' to NON_SHOP_PREFIXES#7137
Fix admin URL for local core: add 'admin' to NON_SHOP_PREFIXES#7137craigmichaelmartin merged 1 commit intomainfrom
Conversation
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
When running against a local core, pressing 'p' to preview in the
Shopify CLI incorrectly opens admin.my.shop.dev instead of
admin.shop.dev. This happens because 'admin' is not in the
NON_SHOP_PREFIXES list in the 2024 dev server, causing the host
function to treat it as a shop name and route it through the
{prefix}.my.shop.dev pattern instead of {prefix}.shop.dev.
Co-authored-by: Paulo Margarido <paulo.margarido@shopify.com>
5cd1758 to
4deaee1
Compare
| import type {HostOptions} from './types.js' | ||
|
|
||
| const NON_SHOP_PREFIXES = ['app', 'dev', 'shopify'] | ||
| const NON_SHOP_PREFIXES = ['admin', 'app', 'dev', 'shopify'] |
There was a problem hiding this comment.
Wait, just noticed this file is in node/vendor 🤔
There was a problem hiding this comment.
Yeah, the fix makes sense (didn't tophat), but we need to check if we need to update this vendored file
|
This file is vendored from The right approach is to fix it upstream in |
When running against a local core, pressing 'p' to preview in the Shopify CLI incorrectly opens admin.my.shop.dev instead of admin.shop.dev. This happens because 'admin' is not in the NON_SHOP_PREFIXES list in the 2024 dev server, causing the host function to treat it as a shop name and route it through the {prefix}.my.shop.dev pattern instead of {prefix}.shop.dev.