if ($isMaintenancePageRoute) { $request->attributes->
set('_route', 'frontend.maintenance'
);
$request->attributes->
set(SalesChannelRequest::ATTRIBUTE_IS_ALLOWED_IN_MAINTENANCE, true
);
} if ($useProxy) { $proxyIp = '172.17.1.12';
$request->server->
set('REMOTE_ADDR',
$proxyIp);
$request->
setTrustedProxies([$proxyIp], Request::HEADER_FORWARDED
);
$request->headers->
set('Forwarded',
sprintf('by=%s;for=%s',
$proxyIp,
$clientIp));
} else { $request->server->
set('REMOTE_ADDR',
$clientIp);
} $request->attributes->
set(SalesChannelRequest::ATTRIBUTE_IS_SALES_CHANNEL_REQUEST,
$isSalesChannelRequest);
$request->attributes->
set(SalesChannelRequest::ATTRIBUTE_SALES_CHANNEL_MAINTENANCE,
$isMaintenanceModeActive);
$request->attributes->
set(SalesChannelRequest::ATTRIBUTE_SALES_CHANNEL_MAINTENANCE_IP_WHITLELIST,
json_encode($allowedIpAddresses, \JSON_THROW_ON_ERROR
));
return $request;
}}