@@ -2,17 +2,9 @@ import { env } from 'node:process'
22
33/**
44 * Generate `allowedHosts` config for `AngularAppEngine` from `@angular/ssr`
5- * @param {Object } [config={}]
6- * @param {string[] } [config.additionalAllowedHosts=[]] Additional allowed hosts
7- * @param {boolean } [config.injectDefaults=true] Whether to inject Netlify default hosts
8- *
95 * @returns {string[] }
106 */
11- export function getAllowedHosts ( { additionalAllowedHosts = [ ] , injectDefaults = true } = { } ) {
12- if ( ! injectDefaults || additionalAllowedHosts . includes ( '*' ) ) {
13- return [ ...new Set ( additionalAllowedHosts ) ]
14- }
15-
7+ export function getAllowedHosts ( ) {
168 const defaultAllowedHosts = [ ]
179
1810 let deployId
@@ -87,12 +79,11 @@ export function getAllowedHosts({ additionalAllowedHosts = [], injectDefaults =
8779 defaultAllowedHosts . push ( `${ deployId } --${ siteId } .netlify.app` )
8880 }
8981
90- return [ ...new Set ( [ ... defaultAllowedHosts , ... additionalAllowedHosts ] ) ]
82+ return [ ...new Set ( defaultAllowedHosts ) ]
9183}
9284
9385/**
9486 * Return Netlify-specific context
95- *
9687 * @returns {import('@netlify/edge-functions').Context | undefined }
9788 */
9889export function getContext ( ) {
@@ -144,20 +135,8 @@ function getHostnameFromEnvironmentVariable(environmentVariable) {
144135
145136/**
146137 * Generate `trustProxyHeaders` config for `AngularAppEngine` from `@angular/ssr`
147- *
148- * @param {{
149- * additionalTrustProxyHeaders?: string[]
150- * } | {
151- * trustAll?: boolean
152- * }} [config]
153- *
154- * @returns {boolean | string[] }
138+ * @returns {string[] }
155139 */
156-
157- export function getTrustProxyHeaders ( { additionalTrustProxyHeaders = [ ] , trustAll = false } = { } ) {
158- if ( trustAll === true ) {
159- return true
160- }
161-
162- return [ ...new Set ( [ 'x-forwarded-for' , ...additionalTrustProxyHeaders ] ) ]
140+ export function getTrustProxyHeaders ( ) {
141+ return [ 'x-forwarded-for' ]
163142}
0 commit comments