Skip to content

Commit 40f33c7

Browse files
author
Benjamin DUPUIS
committed
Allow to not configure default parameters
1 parent db864c5 commit 40f33c7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

grafana/files/grafana.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ logs = {{ server.path.logs }}
2020
#################################### Server ####################################
2121
[server]
2222
# Protocol (http or https)
23+
{%- if 'protocol' in server %}
2324
protocol = {{ server.protocol }}
25+
{%- else %}
26+
;protocol = http
27+
{% endif %}
2428

2529
# The ip address to bind to, empty will bind to all interfaces
2630
http_addr = {{ server.bind.address }}
@@ -29,14 +33,22 @@ http_addr = {{ server.bind.address }}
2933
http_port = {{ server.bind.port }}
3034

3135
# The public facing domain name used to access grafana from a browser
36+
{%- if 'domain' in server %}
3237
domain = {{ server.domain }}
38+
{%- else %}
39+
;domain = localhost
40+
{%- endif %}
3341

3442
# Redirect to correct domain if host header does not match domain
3543
# Prevents DNS rebinding attacks
3644
;enforce_domain = false
3745

3846
# The full public facing url
47+
{%- if 'root_url' in server %}
3948
root_url = {{ server.root_url }}
49+
{%- else %}
50+
;root_url = %(protocol)s://%(domain)s:%(http_port)s/
51+
{%- endif %}
4052

4153
# Log web requests
4254
;router_logging = false

0 commit comments

Comments
 (0)