mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
!fix: Disallow access urls without valid scheme (#6548)
Existing deployments will need to prepend a scheme if they have not already.
This commit is contained in:
@ -295,7 +295,8 @@ flags, and YAML configuration. The precedence is as follows:
|
|||||||
return xerrors.Errorf("TLS is disabled. Enable with --tls-enable or specify a HTTP address")
|
return xerrors.Errorf("TLS is disabled. Enable with --tls-enable or specify a HTTP address")
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.AccessURL.String() != "" && cfg.AccessURL.Scheme == "" {
|
if cfg.AccessURL.String() != "" &&
|
||||||
|
!(cfg.AccessURL.Scheme == "http" || cfg.AccessURL.Scheme == "https") {
|
||||||
return xerrors.Errorf("access-url must include a scheme (e.g. 'http://' or 'https://)")
|
return xerrors.Errorf("access-url must include a scheme (e.g. 'http://' or 'https://)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user