summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/core/render-context.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/astro/src/core/render-context.ts b/packages/astro/src/core/render-context.ts
index d35e635e0..910ee679e 100644
--- a/packages/astro/src/core/render-context.ts
+++ b/packages/astro/src/core/render-context.ts
@@ -234,20 +234,20 @@ export class RenderContext {
async #executeRewrite(reroutePayload: RewritePayload) {
this.pipeline.logger.debug('router', 'Calling rewrite: ', reroutePayload);
if (!this.pipeline.manifest.rewritingEnabled) {
- this.pipeline.logger.error(
- 'router',
- 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.'
- );
- return new Response(
- 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.',
- {
- status: 500,
- statusText:
- 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.',
- }
- );
- }
- const [routeData, component, newURL] = await this.pipeline.tryRewrite(
+ this.pipeline.logger.error(
+ 'router',
+ 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.'
+ );
+ return new Response(
+ 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.',
+ {
+ status: 500,
+ statusText:
+ 'The rewrite API is experimental. To use this feature, add the `rewriting` flag to the `experimental` object in your Astro config.',
+ }
+ );
+ }
+ const [routeData, component, newURL] = await this.pipeline.tryRewrite(
reroutePayload,
this.request,
this.originalRoute