aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/en/user/installation.rst17
-rw-r--r--src/Wallabag/CoreBundle/Helper/HttpClientFactory.php10
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml1
3 files changed, 26 insertions, 2 deletions
diff --git a/docs/en/user/installation.rst b/docs/en/user/installation.rst
index 7d3bcf61..7fb81aeb 100644
--- a/docs/en/user/installation.rst
+++ b/docs/en/user/installation.rst
@@ -149,6 +149,23 @@ Assuming you install wallabag in the ``/var/www/wallabag`` folder and that you w
149 ErrorLog /var/log/apache2/wallabag_error.log 149 ErrorLog /var/log/apache2/wallabag_error.log
150 CustomLog /var/log/apache2/wallabag_access.log combined 150 CustomLog /var/log/apache2/wallabag_access.log combined
151 </VirtualHost> 151 </VirtualHost>
152
153
154.. tip:: Note for Apache 2.4, in the section `<Directory /var/www/wallabag/web>` you have to replace the directives :
155
156::
157
158 AllowOverride None
159 Order Allow,Deny
160 Allow from All
161
162
163by
164
165::
166
167 Require All granted
168
152 169
153After reloading or restarting Apache, you should now be able to access wallabag at http://domain.tld. 170After reloading or restarting Apache, you should now be able to access wallabag at http://domain.tld.
154 171
diff --git a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
index 8891887b..1ac8feb1 100644
--- a/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
+++ b/src/Wallabag/CoreBundle/Helper/HttpClientFactory.php
@@ -6,6 +6,7 @@ use Graby\Ring\Client\SafeCurlHandler;
6use GuzzleHttp\Client; 6use GuzzleHttp\Client;
7use GuzzleHttp\Cookie\CookieJar; 7use GuzzleHttp\Cookie\CookieJar;
8use GuzzleHttp\Event\SubscriberInterface; 8use GuzzleHttp\Event\SubscriberInterface;
9use Psr\Log\LoggerInterface;
9 10
10/** 11/**
11 * Builds and configures the Guzzle HTTP client. 12 * Builds and configures the Guzzle HTTP client.
@@ -19,6 +20,7 @@ class HttpClientFactory
19 private $cookieJar; 20 private $cookieJar;
20 21
21 private $restrictedAccess; 22 private $restrictedAccess;
23 private $logger;
22 24
23 /** 25 /**
24 * HttpClientFactory constructor. 26 * HttpClientFactory constructor.
@@ -26,12 +28,14 @@ class HttpClientFactory
26 * @param \GuzzleHttp\Event\SubscriberInterface $authenticatorSubscriber 28 * @param \GuzzleHttp\Event\SubscriberInterface $authenticatorSubscriber
27 * @param \GuzzleHttp\Cookie\CookieJar $cookieJar 29 * @param \GuzzleHttp\Cookie\CookieJar $cookieJar
28 * @param string $restrictedAccess this param is a kind of boolean. Values: 0 or 1 30 * @param string $restrictedAccess this param is a kind of boolean. Values: 0 or 1
31 * @param LoggerInterface $logger
29 */ 32 */
30 public function __construct(SubscriberInterface $authenticatorSubscriber, CookieJar $cookieJar, $restrictedAccess) 33 public function __construct(SubscriberInterface $authenticatorSubscriber, CookieJar $cookieJar, $restrictedAccess, LoggerInterface $logger)
31 { 34 {
32 $this->authenticatorSubscriber = $authenticatorSubscriber; 35 $this->authenticatorSubscriber = $authenticatorSubscriber;
33 $this->cookieJar = $cookieJar; 36 $this->cookieJar = $cookieJar;
34 $this->restrictedAccess = $restrictedAccess; 37 $this->restrictedAccess = $restrictedAccess;
38 $this->logger = $logger;
35 } 39 }
36 40
37 /** 41 /**
@@ -39,8 +43,10 @@ class HttpClientFactory
39 */ 43 */
40 public function buildHttpClient() 44 public function buildHttpClient()
41 { 45 {
46 $this->logger->log('debug', 'Restricted access config enabled?', array('enabled' => (int) $this->restrictedAccess));
47
42 if (0 === (int) $this->restrictedAccess) { 48 if (0 === (int) $this->restrictedAccess) {
43 return null; 49 return;
44 } 50 }
45 51
46 // we clear the cookie to avoid websites who use cookies for analytics 52 // we clear the cookie to avoid websites who use cookies for analytics
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index 036735ec..51d6ab47 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -74,6 +74,7 @@ services:
74 - "@bd_guzzle_site_authenticator.authenticator_subscriber" 74 - "@bd_guzzle_site_authenticator.authenticator_subscriber"
75 - "@wallabag_core.guzzle.cookie_jar" 75 - "@wallabag_core.guzzle.cookie_jar"
76 - '@=service(''craue_config'').get(''restricted_access'')' 76 - '@=service(''craue_config'').get(''restricted_access'')'
77 - '@logger'
77 78
78 wallabag_core.guzzle.cookie_jar: 79 wallabag_core.guzzle.cookie_jar:
79 class: GuzzleHttp\Cookie\FileCookieJar 80 class: GuzzleHttp\Cookie\FileCookieJar