Skip to content

Commit

Permalink
Change response code to 502 when no backend found
Browse files Browse the repository at this point in the history
  • Loading branch information
jordaneb authored Aug 19, 2019
1 parent e78a74d commit 9d0a68d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def proxy(path):
hostname = urlparse(request.base_url).hostname
if hostname not in routes:
app.logger.warn(f"No backend for {hostname}")
abort(404)
abort(502)

path = request.full_path if request.args else request.path
target_url = f"http://localhost:{routes[hostname]}{path}"
Expand Down

0 comments on commit 9d0a68d

Please sign in to comment.