From 2832a953b9c970b01878c659977f7ef86354fb20 Mon Sep 17 00:00:00 2001 From: cbeauvoi Date: Fri, 26 Jul 2019 16:41:04 +0200 Subject: [PATCH] debug for prod --- BillingBundle/Service/BillingSrv.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BillingBundle/Service/BillingSrv.php b/BillingBundle/Service/BillingSrv.php index 7fc4ff8..52055a1 100644 --- a/BillingBundle/Service/BillingSrv.php +++ b/BillingBundle/Service/BillingSrv.php @@ -13,7 +13,10 @@ class BillingSrv { $this->container = $container; - $this->url_prefix = $env == "dev" ? $this->container->getParameter('dev_ngrok_prefix') + $ngrok_prefix = $this->container->getParameter('dev_ngrok_prefix'); + + $this->url_prefix = $env == ("dev" && !empty($ngrok_prefix)) + ? $ngrok_prefix : $container->get('router')->getContext()->getBaseUrl(); }