Skip to content

Commit

Permalink
i18n(zh-cn): Update cli-reference.mdx (#11101)
Browse files Browse the repository at this point in the history
Co-authored-by: liruifengv <[email protected]>
  • Loading branch information
Nin3lee and liruifengv authored Mar 3, 2025
1 parent 4341566 commit c5cf947
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/content/docs/zh-cn/reference/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@ astro --config config/astro.config.mjs dev
不要在生产环境中使用 `--host` 标志来公开开发服务器和预览服务器。这些服务器仅设计用于在开发你的网站时本地使用。
:::

### `--allowed-hosts`

<p><Since v="5.4.0" /></p>

`dev``preview` 模式下,指定允许 Astro 响应的主机名(hostname)。可以传入一列由逗号分割的主机名来进行许可,或者是传入 `true` 来对任何的主机名都进行许可。

更多信息请参阅 [Vite 的 `allowedHosts` 功能](https://cn.vite.dev/config/server-options#server-allowedhosts),其中包含了许可主机名的安全隐患。

### `--verbose`

Expand Down

0 comments on commit c5cf947

Please sign in to comment.