mirror of https://github.com/hashicorp/consul
ui: Lazily detect HTTP protocol (#7644)
This commit includes 2 things: 1. Sometimes (seemingly due to client caching), performance entries aren't available, even for the currently executing script. This waits until the first retrieval of 'CONSUL_HTTP_PROTOCOL' before using the performance entries to decide this. This means that the entries aren't inspected until ember has initialized, which means that the entries are always available. 2. getCurrentResource/getResourceFor could potentially return undefined if the correct entry could not be found. This adds a default {} return value if the resource cannot be found. This means that if for whatever reason the correct resource cannot be found at least we don't fail with an error and just drop back to HTTP/1 functionality.pull/7650/head
parent
7733c68306
commit
04a8a77365
Loading…
Reference in new issue