nolint:revive
(u string)
| 398 | |
| 399 | // nolint:revive |
| 400 | func validateProxyURL(u string) error { |
| 401 | p, err := url.Parse(u) |
| 402 | if err != nil { |
| 403 | return err |
| 404 | } |
| 405 | if p.Scheme != "http" && p.Scheme != "https" { |
| 406 | return xerrors.New("scheme must be http or https") |
| 407 | } |
| 408 | if !(p.Path == "/" || p.Path == "") { |
| 409 | return xerrors.New("path must be empty or /") |
| 410 | } |
| 411 | return nil |
| 412 | } |
| 413 | |
| 414 | // @Summary Get workspace proxies |
| 415 | // @ID get-workspace-proxies |