diff options
Diffstat (limited to 'packages/astro/src/core/request.ts')
-rw-r--r-- | packages/astro/src/core/request.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/packages/astro/src/core/request.ts b/packages/astro/src/core/request.ts index 93b552901..9b2dc07ca 100644 --- a/packages/astro/src/core/request.ts +++ b/packages/astro/src/core/request.ts @@ -1,6 +1,5 @@ import type { IncomingHttpHeaders } from 'node:http'; import type { Logger } from './logger/core.js'; -import { appendForwardSlash, prependForwardSlash } from './path.js'; type HeaderType = Headers | Record<string, any> | IncomingHttpHeaders; type RequestBody = ArrayBuffer | Blob | ReadableStream | URLSearchParams | FormData; @@ -35,7 +34,6 @@ const clientLocalsSymbol = Symbol.for('astro.locals'); * This is used by the static build to create fake requests for prerendering, and by the dev server to convert node requests into the standard request object. */ export function createRequest({ - base, url, headers, clientAddress, @@ -60,10 +58,7 @@ export function createRequest({ if (typeof url === 'string') url = new URL(url); - const imageEndpoint = prependForwardSlash(appendForwardSlash(base)) + '_image'; - - // HACK! astro:assets uses query params for the injected route in `dev` - if (staticLike && url.pathname !== imageEndpoint) { + if (staticLike) { url.search = ''; } |