Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
another stab at getting ProxyAddress and dev/prod env to play nice
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed Dec 19, 2016
1 parent 9966570 commit 6c67a05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ func main() {
if cfg.ProxyAddress != "" {
endpointURL = fmt.Sprintf("\"%s\"", strings.TrimSuffix(cfg.ProxyAddress, "/"))
} else {
endpointURL = fmt.Sprintf("\"%s\"", cfg.ListenAddress)
endpointURL = "document.location.hostname + ':' + (window.NOMAD_ENDPOINT_PORT || document.location.port)"
}

response = append(response, fmt.Sprintf("window.NOMAD_ENDPOINT=%s", endpointURL))

w.Header().Set("Content-Type", "application/javascript")
Expand Down

0 comments on commit 6c67a05

Please sign in to comment.