# HG changeset patch # User Goffi # Date 1637533213 -3600 # Node ID 6643855770a503ab25b47cf4d9b6571c2c70fc1c # Parent 595e7fef41f3f01258998df7d0b6de54668f4deb server: fix indentation following merge diff -r 595e7fef41f3 -r 6643855770a5 libervia/server/server.py --- a/libervia/server/server.py Fri Nov 12 17:48:30 2021 +0100 +++ b/libervia/server/server.py Sun Nov 21 23:20:13 2021 +0100 @@ -517,28 +517,28 @@ # normal redirection system is not used here continue - elif new_url.scheme == "proxy": - # a reverse proxy - host, port = new_url.hostname, new_url.port - if host is None or port is None: - raise ValueError( - "invalid host or port in proxy redirection, please check your " - "configuration: {new_url.geturl()}" + elif new_url.scheme == "proxy": + # a reverse proxy + host, port = new_url.hostname, new_url.port + if host is None or port is None: + raise ValueError( + "invalid host or port in proxy redirection, please check your " + "configuration: {new_url.geturl()}" + ) + url_prefix = (new_url.path or old).rstrip('/') + res = proxy.SatReverseProxyResource( + host, + port, + url_prefix.encode(), ) - url_prefix = (new_url.path or old).rstrip('/') - res = proxy.SatReverseProxyResource( - host, - port, - url_prefix.encode(), - ) - self.addResourceToPath(old, res) - log.info( - f"[{self.host_name}] Added redirection from /{old} to reverse proxy " - f"{new_url.netloc} with URL prefix {url_prefix}/" - ) + self.addResourceToPath(old, res) + log.info( + f"[{self.host_name}] Added redirection from /{old} to reverse proxy " + f"{new_url.netloc} with URL prefix {url_prefix}/" + ) - # normal redirection system is not used here - continue + # normal redirection system is not used here + continue else: raise NotImplementedError( "{scheme}: scheme is not managed for url_redirections_dict".format(