From 4ae36c132d7f893652d30ed92a02df8a70c63c6b Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 18 Feb 2024 01:47:51 +1300 Subject: [PATCH] Have a sensible default setting for the UserAgent --- config/example-config.php | 7 ++++--- inc/always.php.in | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/example-config.php b/config/example-config.php index 45026adf..386f29a3 100644 --- a/config/example-config.php +++ b/config/example-config.php @@ -366,11 +366,12 @@ $c->admin_email = 'calendar-admin@example.com'; /** * External subscription (BIND) user agent string -* Required if your remote calendar only delivers to known user agents. +* You may need to set a specific stirng if your remote calendar only delivers +* to known user agents. * -* Default: none +* Default: DAViCal/$version */ -// $c->external_ua_string = ''; +// $c->external_ua_string = "DAViCal/" . $c->version_string; /** * If you want to force DAViCal to use HTTP Digest Authentication for CalDAV diff --git a/inc/always.php.in b/inc/always.php.in index 74ecb409..9a852207 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -312,6 +312,9 @@ if ( isset($c->version_string) && preg_match( '/(\d+)\.(\d+)\.(\d+)(.*)/', $c->v // What is our minimum supported version of PHP? $c->minimum_php_version = '5.4.0'; +// Default UserAgent string when fetching content from elsewhere. +$c->external_ua_string = "DAViCal/" . $c->version_string; + /** * Force the domain name to what was in the configuration file */