Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Include Zulip version and external host in camo User-Agent.

Alex Vandiverc17564ac2739
diff --git a/puppet/zulip/manifests/camo.pp b/puppet/zulip/manifests/camo.pp
index c5e555ebca1..f6401f45a44 100644
--- a/puppet/zulip/manifests/camo.pp
+++ b/puppet/zulip/manifests/camo.pp
@@ -35,6 +35,8 @@ class zulip::camo (String $listen_address = '0.0.0.0') {
$proxy = ''
}
+ $zulip_version = $facts['zulip_version']
+ $external_uri = pick(get_django_setting_slow('ROOT_DOMAIN_URI'), 'https://zulip.com')
file { "${zulip::common::supervisor_conf_dir}/go-camo.conf":
ensure => file,
require => [
diff --git a/puppet/zulip/templates/supervisor/go-camo.conf.erb b/puppet/zulip/templates/supervisor/go-camo.conf.erb
index 1717708c7c6..c6593d3df1a 100644
--- a/puppet/zulip/templates/supervisor/go-camo.conf.erb
+++ b/puppet/zulip/templates/supervisor/go-camo.conf.erb
@@ -1,5 +1,5 @@
[program:go-camo]
-command=/usr/local/bin/secret-env-wrapper GOCAMO_HMAC=camo_key <%= @bin %> --listen=<%= @listen_address %>:9292 -H "Strict-Transport-Security: max-age=15768000" -H "X-Frame-Options: DENY" --metrics --verbose --allow-content-video
+command=/usr/local/bin/secret-env-wrapper GOCAMO_HMAC=camo_key <%= @bin %> --listen=<%= @listen_address %>:9292 -H "Strict-Transport-Security: max-age=15768000" -H "X-Frame-Options: DENY" --metrics --verbose --allow-content-video --user-agent "Zulip-Server/<%= @zulip_version %> (<%= @external_uri %>/) go-camo/<%= @version %>" --server-name "go-camo/<%= @version %>"
environment=HTTP_PROXY="<%= @proxy %>",HTTPS_PROXY="<%= @proxy %>"
priority=15
autostart=true