0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-04-07 23:41:43 -05:00

fix(config): handle boolean server.allowedHosts (#13437)

Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
This commit is contained in:
Vardhaman Bhandari 2025-03-18 14:37:28 +05:30 committed by GitHub
parent bcf1923218
commit 013fa87982
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': minor
---
Handle server.allowedHosts when the value is true without attempting to push it into an array.

View file

@ -40,6 +40,11 @@ function mergeConfigRecursively(
}
}
// for server.allowedHosts, if the value is a boolean
if (key === 'allowedHosts' && rootPath === 'server' && typeof existing === 'boolean') {
continue;
}
if (key === 'data' && rootPath === 'db') {
// db.data can be a function or an array of functions. When
// merging, make sure they become an array