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:
parent
bcf1923218
commit
013fa87982
2 changed files with 10 additions and 0 deletions
5
.changeset/bitter-rockets-pull.md
Normal file
5
.changeset/bitter-rockets-pull.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': minor
|
||||
---
|
||||
|
||||
Handle server.allowedHosts when the value is true without attempting to push it into an array.
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue