-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Describe the bug
The current code assumes use of its embedded Studio ability, and will cause a seeming Astro error if a fully pathed Studio url is attempted. However, after discussion with them, it's clear the problem is that @sanity/astro is in this case attempting to add an Astro route which is not within the Astro app, which it properly rejects.
This report will be referenced by a simple PR which avoids this problem, allowing separate Studios to be used.
To Reproduce
- in a Sanity Astro project's
astro.config
, setstudioBasePath
to any full protocol-domain url (e.g. http://localhost:3333), rather than the usual path only (e.g. /admin) - attempt to start the app in dev
- Note a crash occurs, with a spurious-seeming error from Astro
Expected behavior
A full protocol-domain url studioBasePath
should be always accepted, and operate as expected if it points to an available Sanity Studio.
Which versions of Sanity are you using?
$ sanity versions
@sanity/cli (global) 3.53.0 (latest: 3.54.0)
@sanity/prettier-config 1.0.2 (up to date)
What operating system are you using?
Windows 11 very latest
Which versions of Node.js / npm are you running?
$ pnpm -v && node -v
9.1.2
v20.11.1
Additional context
@sanity/[email protected]
Security issue?
none