summaryrefslogtreecommitdiff
path: root/internal/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server.go')
-rw-r--r--internal/server.go5
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 {