UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 280 B
const e=e=>{let t=e.trim().replace(/\/+$/,``);return/^https?:\/\//i.test(t)?t:`https://${t}`},t=t=>{if(t.config.host?.trim())return e(t.config.host);let n=new URL(t.request.url);return e(n.origin)};export{t as default,e as normalizeHost}; //# sourceMappingURL=get-base-url.mjs.map