Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ func SetupConfig(envFilePath string) error {
return errors.New("Trust Authority base URL needs to be provided in configuration")
}

if !strings.HasPrefix(configValues.TrustAuthorityBaseUrl, "https://") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is someone changes the config file post installation, will this check still work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will raise another PR against internal branch.

return errors.New("Invalid Trust Authority base URL, must start with 'https://'")
}

_, err = url.Parse(configValues.TrustAuthorityBaseUrl)
if err != nil {
return errors.Wrap(err, "Invalid Trust Authority Base URL")
Expand Down