You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /_emdash/ prefix is currently hardcoded across route injection, middleware, the admin SPA, and the CLI. Would you be open to making it configurable via EmDashConfig?
Security hardening: non-default admin paths reduce drive-by scanning and brute-force surface. Not security-by-obscurity alone, but a useful layer alongside auth.
Reverse proxy / multi-tenant setups: when multiple services share a domain, a custom prefix avoids collisions (that's kind of my use case, I try to not have tools in the main domain and would like to have the admin in a subdomain fully gated behing CF)
Branding: some teams prefer their own path convention.
Scope assessment (from reading the source):
The change touches around 23 files but is mechanical in most. Route injection is already centralised in injectCoreRoutes() which makes the evolution not that hard to implement. The main work would be:
Add basePath?: string to EmDashConfig (default '/_emdash')
Expose it via the virtual module so middleware and admin SPA read it at runtime
Replace the ~313 hardcoded "/_emdash/" route strings with the config value
DB table names (_emdash_collections etc.) and internal variable names (__emdashConfig) are unaffected as only URL paths change.
It's definitely not the most important feature I know but it's a low hanging fruit :)
Thanks for the hard and work and happy to contribute the PR if the approach looks right.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The /_emdash/ prefix is currently hardcoded across route injection, middleware, the admin SPA, and the CLI. Would you be open to making it configurable via EmDashConfig?
emdash({
basePath: '/_cms', // default: '/_emdash'
})
Use cases:
Scope assessment (from reading the source):
The change touches around 23 files but is mechanical in most. Route injection is already centralised in injectCoreRoutes() which makes the evolution not that hard to implement. The main work would be:
DB table names (_emdash_collections etc.) and internal variable names (__emdashConfig) are unaffected as only URL paths change.
It's definitely not the most important feature I know but it's a low hanging fruit :)
Thanks for the hard and work and happy to contribute the PR if the approach looks right.
Christophe
Beta Was this translation helpful? Give feedback.
All reactions