diff options
author | 2025-02-27 05:26:41 -0800 | |
---|---|---|
committer | 2025-02-27 13:26:41 +0000 | |
commit | 9aa5ac10197f08e316a1c4223cfc1fbd5913b3b7 (patch) | |
tree | a8952a67d2f612f4ec6cfaead91f4303c7cfb297 /.changeset/grumpy-sloths-fail.md | |
parent | 53508aa7ecdb73780e178eed896748caaa6aae61 (diff) | |
download | astro-9aa5ac10197f08e316a1c4223cfc1fbd5913b3b7.tar.gz astro-9aa5ac10197f08e316a1c4223cfc1fbd5913b3b7.tar.zst astro-9aa5ac10197f08e316a1c4223cfc1fbd5913b3b7.zip |
[ci] release (#13318)astro@5.4.0@astrojs/vercel@8.1.0@astrojs/svelte@7.0.5@astrojs/solid-js@5.0.5@astrojs/react@4.2.1@astrojs/preact@4.0.5@astrojs/node@9.1.2@astrojs/netlify@6.2.2@astrojs/mdx@4.1.0@astrojs/markdown-remark@6.2.0@astrojs/markdoc@0.12.10@astrojs/internal-helpers@0.6.0@astrojs/db@0.14.7@astrojs/cloudflare@12.2.3
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to '.changeset/grumpy-sloths-fail.md')
-rw-r--r-- | .changeset/grumpy-sloths-fail.md | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/.changeset/grumpy-sloths-fail.md b/.changeset/grumpy-sloths-fail.md deleted file mode 100644 index 1a5e9b272..000000000 --- a/.changeset/grumpy-sloths-fail.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'astro': minor ---- - -Adds a new configuration option `server.allowedHosts` and CLI option `--allowed-hosts`. - -Now you can specify the hostnames that the dev and preview servers are allowed to respond to. This is useful for allowing additional subdomains, or running the dev server in a web container. - -`allowedHosts` checks the Host header on HTTP requests from browsers and if it doesn't match, it will reject the request to prevent CSRF and XSS attacks. - -```shell -astro dev --allowed-hosts=foo.bar.example.com,bar.example.com -``` - -```shell -astro preview --allowed-hosts=foo.bar.example.com,bar.example.com -``` - -```js -// astro.config.mjs -import {defineConfig} from "astro/config"; - -export default defineConfig({ - server: { - allowedHosts: ['foo.bar.example.com', 'bar.example.com'] - } -}) -``` - -This feature is the same as [Vite's `server.allowHosts` configuration](https://vite.dev/config/server-options.html#server-allowedhosts). |