diff --git a/.changeset/dull-teeth-cut.md b/.changeset/dull-teeth-cut.md new file mode 100644 index 000000000000..6ccc17844dd4 --- /dev/null +++ b/.changeset/dull-teeth-cut.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds `server.allowedHosts` docs comment to `AstroUserConfig` diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index a2f9d3253ea9..bf4b9778ed8b 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -906,6 +906,26 @@ export interface ViteUserConfig extends OriginalViteUserConfig { * ``` */ + /** + * @docs + * @name server.allowedHosts + * @type {string[] | true} + * @default `[]` + * @version 5.4.0 + * @description + * + * A list of hostnames that Astro is allowed to respond to. When the value is set to `true`, any + * hostname is allowed. + * + * ```js + * { + * server: { + * allowedHosts: ['staging.example.com', 'qa.example.com'] + * } + * } + * ``` + */ + /** * @docs * @name server.open