diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:29:53 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-11-24 13:29:53 +0300 |
commit | 5ffd39e41866614de47ff427d3156062a6879e1c (patch) | |
tree | 7c4b031596057329ca5dc3b7a406d2b631a11c7d /internal/domain | |
parent | bc61f03703dffb79c3d9d887385b968315362caa (diff) |
Respond with 502 if a domain can not be retrieved from a source
Diffstat (limited to 'internal/domain')
-rw-r--r-- | internal/domain/domain.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/domain/domain.go b/internal/domain/domain.go index f7eba5ca..28eb3196 100644 --- a/internal/domain/domain.go +++ b/internal/domain/domain.go @@ -162,10 +162,8 @@ func (d *Domain) EnsureCertificate() (*tls.Certificate, error) { // ServeFileHTTP returns true if something was served, false if not. func (d *Domain) ServeFileHTTP(w http.ResponseWriter, r *http.Request) bool { if d.isUnconfigured() || !d.HasLookupPath(r) { - // TODO: this seems to be wrong: - // as we should rather return false, - // and fallback to `ServeNotFoundHTTP` - // to handle this case + // TODO: this seems to be wrong: as we should rather return false, and + // fallback to `ServeNotFoundHTTP` to handle this case httperrors.Serve404(w) return true } |