emdash icon indicating copy to clipboard operation
emdash copied to clipboard

[bug]: Emdash Admin UI breaks when Astro base is set (double prefix + 404)

Open sreehari-credhive opened this issue 7 months ago • 2 comments

Bug Description

When using Emdash with Astro configured with a non-root base (e.g. /blogs), the admin UI (/_emdash) becomes unusable:

/_emdash → returns 404 /blogs/_emdash → redirects to /blogs/_emdash/blogs/_emdash (not found issue)

This makes the admin panel inaccessible when hosting under a subpath.

Steps to Reproduce

Framework: Astro CMS: Emdash Deployment: Cloudflare Workers (reverse proxy setup) Astro config:

export default defineConfig({
  base: "/blogs",
});

Worker routing In Main Website:

export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const url = new URL(request.url);
    const p = url.pathname;

    if (p === "/blogs" || p.startsWith("/blogs/")) {
      return env.BLOG.fetch(request);
    }

    return env.APP.fetch(request);
  },
};

Actual vs Expected Behavior

  • it should server correctly on "/blogs/_emdash"

emdash Version

0.0.3

Operating System

Macos 26.3.1

Additional Context

I have my next js website hosted in cf workers - i am trying to add emdash in "/blogs" and proxying it via workers

sreehari-credhive avatar Apr 06 '26 08:04 sreehari-credhive

this is the wrong repo lol

https://github.com/emdash-cms/emdash this is the correct repo

janburzinski avatar Apr 06 '26 08:04 janburzinski

Oo lol , sorry , closing the issue

sreehari-credhive avatar Apr 06 '26 08:04 sreehari-credhive