File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ # v5.11.0
2+ ## New
3+ - Added ` SCRAPING_HTTP_PROXY ` env variable
4+ - You can now set an HTTP proxy for scraping requests
5+ - Example value: ` http://username:password@proxyserver:port `
6+ - Added ` SCRAPING_CLIENT_CERT ` env variable
7+ - You can now set a client certificate for scraping requests
8+ - Example value: ` /var/www/cocktails/storage/bar-assistant/my-cert.pem `
9+
110# v5.10.0
211## New
312- Added ` locked_user_cocktails ` filter to cocktails endpoint
Original file line number Diff line number Diff line change 88use Illuminate \Support \Facades \Log ;
99use Illuminate \Support \Facades \Cache ;
1010use Illuminate \Support \Facades \Event ;
11+ use Illuminate \Support \Facades \Http ;
1112use Illuminate \Support \Facades \Redis ;
1213use Illuminate \Support \ServiceProvider ;
1314
@@ -52,6 +53,18 @@ public function boot()
5253 }
5354 });
5455
56+ if (config ('bar-assistant.scraping_client.proxy ' ) !== null ) {
57+ $ options = [
58+ 'proxy ' => config ('bar-assistant.scraping_client.proxy ' ),
59+ ];
60+
61+ if (config ('bar-assistant.scraping_client.cert ' )) {
62+ $ options ['verify ' ] = config ('bar-assistant.scraping_client.cert ' );
63+ }
64+
65+ Http::globalOptions ($ options );
66+ }
67+
5568 Event::listen (function (\SocialiteProviders \Manager \SocialiteWasCalled $ event ) {
5669 $ event ->extendSocialite ('authentik ' , \SocialiteProviders \Authentik \Provider::class);
5770 $ event ->extendSocialite ('authelia ' , \SocialiteProviders \Authelia \Provider::class);
Original file line number Diff line number Diff line change 7474 'enable_feeds ' => (bool ) env ('ENABLE_FEEDS ' , false ),
7575
7676 'enable_password_login ' => (bool ) env ('ENABLE_PASSWORD_LOGIN ' , true ),
77+
78+ 'scraping_client ' => [
79+ 'proxy ' => env ('SCRAPING_HTTP_PROXY ' , null ),
80+ 'cert ' => env ('SCRAPING_CLIENT_CERT ' , null ),
81+ ],
7782];
You can’t perform that action at this time.
0 commit comments