hostFromRequest returns the X-Forwarded-Host value for use in job payloads, so queue workers can resolve the correct database for the request.
(r *http.Request)
| 14 | // hostFromRequest returns the X-Forwarded-Host value for use in job payloads, |
| 15 | // so queue workers can resolve the correct database for the request. |
| 16 | func hostFromRequest(r *http.Request) string { |
| 17 | return strings.TrimSpace(r.Header.Get("X-Forwarded-Host")) |
| 18 | } |
| 19 | |
| 20 | // ValidatePasswordPolicy checks password against resolved config. Returns descriptive error. |
| 21 | func ValidatePasswordPolicy(resolved *config.ResolvedConfig, password string) error { |
no test coverage detected