From: Jeremy Benoist Date: Fri, 18 Mar 2016 19:55:54 +0000 (+0100) Subject: Force user-agent for iansommerville.com X-Git-Tag: 2.0.1~20^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=e71c376db9a96e63595c0773828e96235c8d1233;p=github%2Fwallabag%2Fwallabag.git Force user-agent for iansommerville.com When using the default User Agent, the website returns a 403. By forcing the User Agent for this domain, we got the proper behavior: a 200 Since we can't _append_ new user agent to the default graby configuration, we need to rewrite all the default config + the new one. Fix #1801 --- diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 677c33da..a36f3392 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -39,7 +39,22 @@ services: wallabag_core.graby: class: Graby\Graby arguments: - - { error_message: "wallabag can't retrieve contents for this article. Please report this issue to us." } + - + error_message: "wallabag can't retrieve contents for this article. Please report this issue to us." + http_client: + user_agents: + 'lifehacker.com': 'PHP/5.2' + 'gawker.com': 'PHP/5.2' + 'deadspin.com': 'PHP/5.2' + 'kotaku.com': 'PHP/5.2' + 'jezebel.com': 'PHP/5.2' + 'io9.com': 'PHP/5.2' + 'jalopnik.com': 'PHP/5.2' + 'gizmodo.com': 'PHP/5.2' + '.wikipedia.org': 'Mozilla/5.2' + '.fok.nl': 'Googlebot/2.1' + 'getpocket.com': 'PHP/5.2' + 'iansommerville.com': 'PHP/5.2' calls: - [ setLogger, [ "@logger" ] ] tags: