Enable experimental proxy via configuration option 'experimental_proxy'
Change-Id: I3c5532d661327e3be50153d1360f96b524c91f29
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index c9e9374..3f82113 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -236,8 +236,10 @@
$r->get('/contact')->mail_to_chiffre('documentation#contact');
# API proxy route
- # $r->any('/api/v#apiv' => [apiv => ['1.0']])->to('Proxy#pass');
- # $r->any('/api/v#apiv/*path' => [apiv => ['1.0']])->to('Proxy#pass');
+ if ($conf->{experimental_proxy}) {
+ $r->any('/api/v#apiv' => [apiv => ['1.0']])->to('Proxy#pass');
+ $r->any('/api/v#apiv/*path' => [apiv => ['1.0']])->to('Proxy#pass');
+ }
# Match route
# Corpus route