->
arrayNode('enabled_locales'
) ->
info('Defines the possible locales for the application. This list is used for generating translations files, but also to restrict which locales are allowed when it is set from Accept-Language header (using "set_locale_from_accept_language").'
) ->
prototype('scalar'
)->
end() ->
end() ->
arrayNode('trusted_hosts'
) ->
beforeNormalization()->
ifString()->
then(fn ($v) =>
[$v])->
end() ->
prototype('scalar'
)->
end() ->
end() ->
scalarNode('trusted_proxies'
)->
end() ->
arrayNode('trusted_headers'
) ->
fixXmlConfig('trusted_header'
) ->
performNoDeepMerging() ->
defaultValue(['x-forwarded-for', 'x-forwarded-port', 'x-forwarded-proto'
]) ->
beforeNormalization()->
ifString()->
then(fn ($v) =>
$v ?
array_map('trim',
explode(',',
$v)) :
[])->
end() ->
enumPrototype() ->
values([ 'forwarded',
'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix',
]) ->
end() ->
end() ->
scalarNode('error_controller'
) ->
defaultValue('error_controller'
)