Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/content/docs/en/guides/integrations-guide/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,34 +161,6 @@ export default defineConfig({
});
```

### `experimentalErrorPageHost`

<p>
**Type:** `string | URL` <br />
**Default:** `undefined`<br />
<Since v="9.4.0" pkg="@astrojs/node"/>
</p>

Specifies an alternate host for loading prerendered [custom error pages](/en/basics/astro-pages/#custom-404-error-page).

Astro needs to be able to load your 404 page in order to return it in a response. By default, Astro will load prerendered custom error pages from the same host as the one that the request is made to. For example, if a request is made to `https://example.com/nonexistent-page`, Astro will attempt to load the prerendered error page from `https://example.com/404.html`.

Use `experimentalErrorPageHost` when your custom error page must be loaded from a different host, such as when the server is running behind a reverse proxy or in a container that may not have access to the external host URL. You can also use this when it is more efficient to load the prerendered error page from localhost rather than via the public internet.

The value can be a string or a URL object. It must be a fully-qualified URL, including the protocol (e.g., `http://localhost:4321`). Astro will always load the prerendered error page from the root path, and any path or query parameters will be ignored.

```js
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';

export default defineConfig({
adapter: node({
// Load pages from localhost, not the public URL.
experimentalErrorPageHost: 'http://localhost:4321',
})
});
```

## Usage

First, [performing a build](/en/guides/deploy/#building-your-site-locally). Depending on which `mode` selected (see above) follow the appropriate steps below:
Expand Down
28 changes: 0 additions & 28 deletions src/content/docs/fr/guides/integrations-guide/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,34 +161,6 @@ export default defineConfig({
});
```

### `experimentalErrorPageHost`

<p>
**Type :** `string | URL` <br />
**Par défaut :** `undefined`<br />
<Since v="9.4.0" pkg="@astrojs/node"/>
</p>

Spécifie un hôte alternatif pour le chargement des [pages d'erreur personnalisées](/fr/basics/astro-pages/#page-derreur-404-personnalisée) pré-rendues.

Astro doit pouvoir charger votre page 404 afin de la renvoyer dans une réponse. Par défaut, Astro charge les pages d'erreur personnalisées pré-rendues depuis le même hôte que celui auquel la requête est adressée. Par exemple, si une requête est adressée à `https://example.com/page-inexistante`, Astro tentera de charger la page d'erreur pré-rendue depuis `https://example.com/404.html`.

Utilisez `experimentalErrorPageHost` lorsque votre page d'erreur personnalisée doit être chargée depuis un autre hôte, par exemple lorsque le serveur est exécuté derrière un proxy inverse ou dans un conteneur n'ayant pas accès à l'URL de l'hôte externe. Vous pouvez également l'utiliser lorsqu'il est plus efficace de charger la page d'erreur pré-rendue depuis localhost plutôt que via le réseau Internet public.

La valeur peut être une chaîne de caractères ou un objet URL. Il doit s'agir d'une URL complète, incluant le protocole (par exemple, `http://localhost:4321`). Astro chargera toujours la page d'erreur pré-rendue depuis le chemin racine, et les paramètres de chemin ou de requête seront ignorés.

```js
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';

export default defineConfig({
adapter: node({
// Charger les pages depuis localhost, et non depuis l'URL publique.
experimentalErrorPageHost: 'http://localhost:4321',
})
});
```

## Utilisation

Tout d'abord, [effectuer une compilation](/fr/guides/deploy/#compiler-votre-site-localement). En fonction du `mode` sélectionné (voir ci-dessus), suivez les étapes appropriées ci-dessous :
Expand Down
28 changes: 0 additions & 28 deletions src/content/docs/ko/guides/integrations-guide/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,34 +160,6 @@ export default defineConfig({
});
```

### `experimentalErrorPageHost`

<p>
**타입:** `string | URL` <br />
**기본값:** `undefined`<br />
<Since v="9.4.0" pkg="@astrojs/node"/>
</p>

미리 렌더링된 [사용자 정의 오류 페이지](/ko/basics/astro-pages/#사용자-정의-404-오류-페이지)를 로드하기 위한 대체 호스트를 지정합니다.

응답으로 404 페이지를 반환하려면 Astro가 404 페이지를 로드할 수 있어야 합니다. 기본적으로 Astro는 요청이 이루어진 호스트와 동일한 호스트에서 미리 렌더링된 사용자 정의 오류 페이지를 로드합니다. 예를 들어 `https://example.com/nonexistent-page`에서 요청이 생성된 경우 Astro는 `https://example.com/404.html`에서 미리 렌더링된 오류 페이지를 로드하려고 시도합니다.

서버가 역방향 프록시 뒤에서 실행 중이거나 외부 호스트 URL에 액세스할 수 없는 컨테이너에서 실행되는 경우와 같이 사용자 정의 오류 페이지를 다른 호스트에서 로드해야 하는 경우 `experimentalErrorPageHost`를 사용하세요. 또한 공용 인터넷이 아닌 로컬 호스트에서 미리 렌더링된 오류 페이지를 로드하는 것이 더 효율적인 경우에도 이 옵션을 사용할 수 있습니다.

값은 문자열 또는 URL 객체일 수 있습니다. 프로토콜을 포함하여 정규화된 URL (예: `http://localhost:4321`)이어야 합니다. Astro는 항상 루트 경로에서 미리 렌더링된 오류 페이지를 로드하며 경로 또는 쿼리 매개 변수는 무시됩니다.

```js
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';

export default defineConfig({
adapter: node({
// 공개 URL이 아닌 로컬 호스트에서 페이지를 로드합니다.
experimentalErrorPageHost: 'http://localhost:4321',
})
});
```

## 사용하기

먼저 [빌드를 수행](/ko/guides/deploy/#사이트를-로컬로-빌드)합니다. 선택한 모드 (위 참조)에 따라 아래의 적절한 단계를 따르세요.
Expand Down
28 changes: 0 additions & 28 deletions src/content/docs/zh-cn/guides/integrations-guide/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,34 +160,6 @@ export default defineConfig({
});
```

### `experimentalErrorPageHost`

<p>
**类型:** `string | URL` <br />
**默认值:** `undefined`<br />
<Since v="9.4.0" pkg="@astrojs/node"/>
</p>

指定用于加载预渲染 [自定义错误页面](/zh-cn/basics/astro-pages/#自定义-404-错误页面) 的替代主机。

Astro 需要能够加载你的 404 页面以便在响应中返回。默认情况下,Astro 会从与请求所指向的主机相同的主机加载预渲染的自定义错误页面。例如,如果对 `https://example.com/nonexistent-page` 发起请求,Astro 将尝试从 `https://example.com/404.html` 加载预渲染错误页面。

当你的自定义错误页面必须从不同主机加载时(例如服务器运行在反向代理之后或在可能无法访问外部主机 URL 的容器中),请使用 `experimentalErrorPageHost` 。当从本地主机加载预渲染错误页面比通过公共互联网加载更高效时,也可以使用此选项。

该值可以是字符串或 URL 对象。它必须是一个完整的符合格式的 URL,包括协议(例如, `http://localhost:4321` )。Astro 将始终从根路径加载预渲染错误页面,任何路径或查询参数都将被忽略。

```js
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';

export default defineConfig({
adapter: node({
// 从本地主机加载页面,而不是公共网址。
experimentalErrorPageHost: 'http://localhost:4321',
})
});
```

## 用法

首先,[执行构建](/zh-cn/guides/deploy/#在本地构建站点)。根据选择的模式(见上文),执行以下相应的步骤:
Expand Down