privates['security.access_map'] = $instance = new \Symfony\Component\Security\Http\AccessMap(); $a = new \Symfony\Component\HttpFoundation\RequestMatcher\PathRequestMatcher('^/api/prices'); $instance->add(new \Symfony\Component\HttpFoundation\ChainRequestMatcher([$a, new \Symfony\Component\HttpFoundation\RequestMatcher\IpsRequestMatcher([$container->getEnv('MTO_ALLOWED_API_IPS')])]), ['PUBLIC_ACCESS'], NULL); $instance->add(new \Symfony\Component\HttpFoundation\ChainRequestMatcher([$a]), ['ROLE_NO_ACCESS'], NULL); return $instance; } }