From 40f33c777a50bffdc1abf518973c672569079894 Mon Sep 17 00:00:00 2001 From: Benjamin DUPUIS Date: Thu, 20 Jun 2019 14:53:08 +0200 Subject: [PATCH] Allow to not configure default parameters --- grafana/files/grafana.ini | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/grafana/files/grafana.ini b/grafana/files/grafana.ini index 6866229..836ed97 100644 --- a/grafana/files/grafana.ini +++ b/grafana/files/grafana.ini @@ -20,7 +20,11 @@ logs = {{ server.path.logs }} #################################### Server #################################### [server] # Protocol (http or https) +{%- if 'protocol' in server %} protocol = {{ server.protocol }} +{%- else %} +;protocol = http +{% endif %} # The ip address to bind to, empty will bind to all interfaces http_addr = {{ server.bind.address }} @@ -29,14 +33,22 @@ http_addr = {{ server.bind.address }} http_port = {{ server.bind.port }} # The public facing domain name used to access grafana from a browser +{%- if 'domain' in server %} domain = {{ server.domain }} +{%- else %} +;domain = localhost +{%- endif %} # Redirect to correct domain if host header does not match domain # Prevents DNS rebinding attacks ;enforce_domain = false # The full public facing url +{%- if 'root_url' in server %} root_url = {{ server.root_url }} +{%- else %} +;root_url = %(protocol)s://%(domain)s:%(http_port)s/ +{%- endif %} # Log web requests ;router_logging = false