HTTP Server: Serve Grafana with a custom URL path prefix (#17048)

Adds a new [server] setting `serve_from_sub_path`. By enabling 
this setting and using a subpath in `root_url` setting, e.g.
`root_url = http://localhost:3000/grafana`, Grafana will be accessible 
on `http://localhost:3000/grafana`. By default it is set to `false` 
for compatibility reasons.

Closes #16623
This commit is contained in:
Abhilash Gnan
2019-05-27 17:47:29 +02:00
committed by Marcus Efraimsson
parent b547a0cb34
commit 04d473b3e5
5 changed files with 31 additions and 7 deletions

View File

@@ -47,6 +47,9 @@ enforce_domain = false
# The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = false
# Log web requests
router_logging = false

View File

@@ -48,6 +48,9 @@
# If you use reverse proxy and sub path specify full url (with sub path)
;root_url = http://localhost:3000
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
;serve_from_sub_path = false
# Log web requests
;router_logging = false