Remove trailing / from config.js url
We are sensitive to trailing slashes in the url for the elasticsearch api due to the way kibana3 constructs its urls and how we proxy ES api. Basically if ther config has a trailing / then we double up /'s and the mod rewrite rules for rewriting the ES api breaks. Simple fix is to have config.js remove and /s for us so that puppet doesn't have to be too smart. Fix here adapted from suggested at https://stackoverflow.com/questions/6680825/return-string-without-trailing-slash Change-Id: Ica46003f8a3706c88e9e2bf58e0d3c8ea7c4a50d
This commit is contained in:
parent
86fb79e091
commit
304a9e6e81
|
@ -29,7 +29,7 @@ function (Settings) {
|
|||
* +elasticsearch: {server: "http://localhost:9200", withCredentials: true}+
|
||||
*
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":80"+"<%= @elasticsearch_prefix %>",
|
||||
elasticsearch: "http://"+window.location.hostname+":80"+"<%= @elasticsearch_prefix %>".replace(/\/+$/, ""),
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue