summaryrefslogtreecommitdiff
path: root/internal/server/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/api.go')
-rw-r--r--internal/server/api.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/server/api.go b/internal/server/api.go
index 546c02a..99d6f72 100644
--- a/internal/server/api.go
+++ b/internal/server/api.go
@@ -27,18 +27,15 @@ func validateEndpoints(endpoints Endpoints) error {
if err != nil {
return errors.WrapPrefix(err, "failed to parse API token endpoint", 0)
}
+ if pAPI.Scheme != "https" {
+ return errors.Errorf("API scheme: '%v', is not equal to 'https'", pAPI.Scheme)
+ }
if pAPI.Scheme != pAuth.Scheme {
return errors.Errorf("API scheme: '%v', is not equal to authorization scheme: '%v'", pAPI.Scheme, pAuth.Scheme)
}
if pAPI.Scheme != pToken.Scheme {
return errors.Errorf("API scheme: '%v', is not equal to token scheme: '%v'", pAPI.Scheme, pToken.Scheme)
}
- if pAPI.Host != pAuth.Host {
- return errors.Errorf("API host: '%v', is not equal to authorization host: '%v'", pAPI.Host, pAuth.Host)
- }
- if pAPI.Host != pToken.Host {
- return errors.Errorf("API host: '%v', is not equal to token host: '%v'", pAPI.Host, pToken.Host)
- }
return nil
}