Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion internal/config/config_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ func parseStringAsURL() mapstructure.DecodeHookFuncType {
return nil, fmt.Errorf("cannot cast URL value to string")
}
if dataStr == "" {
return nil, fmt.Errorf("empty values are not allowed for URLs")
// NOTE: In some cases a url is optional and in this case the field is just ""
return nil, nil
}
url, err := url.Parse(dataStr)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions internal/config/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ func (c LoginConfig) Validate(e RunningEnvironment) error {
if c.EnableV1Services && !c.EnableInternalGitlab {
return fmt.Errorf("enabling V1 (legacy) services but disabling the internal Gitlab is not supported in the login config")
}
if c.RenkuBaseURL == nil {
return fmt.Errorf("the renkuBaseURL cannot be null or ''")
}
return nil
}
3 changes: 3 additions & 0 deletions internal/config/revproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ func (r *RevproxyConfig) Validate() error {
if r.EnableV1Services && !r.EnableInternalGitlab {
return fmt.Errorf("enabling V1 (legacy) services but disabling the internal Gitlab is not supported in the reverse proxy config")
}
if r.RenkuBaseURL == nil {
return fmt.Errorf("the renkuBaseURL cannot be null or ''")
}

// Check v1 services if needed
if r.EnableV1Services {
Expand Down
Loading