diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-06 13:49:48 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-06 13:49:48 +0200 |
| commit | 851d2e331cb2a8313529254d119fb0c9ae78c873 (patch) | |
| tree | 77e082e8830958051bc6c21057ff78fc505a35a4 /internal/server.go | |
| parent | f82f65084b77d2e8f9e8be323fedf169270a9824 (diff) | |
Well known: Add override for local server path using env var
Diffstat (limited to 'internal/server.go')
| -rw-r--r-- | internal/server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/server.go b/internal/server.go index 7500a26..9d27907 100644 --- a/internal/server.go +++ b/internal/server.go @@ -252,8 +252,11 @@ type ServerEndpoints struct { V string `json:"v"` } +// Make this a var which we can overwrite in the tests +var WellKnownPath string = ".well-known/vpn-user-portal" + func getEndpoints(baseURL string) (*ServerEndpoints, error) { - url := fmt.Sprintf("%s/.well-known/vpn-user-portal", baseURL) + url := fmt.Sprintf("%s/%s", baseURL, WellKnownPath) _, body, bodyErr := HTTPGet(url) if bodyErr != nil { |
