Skip to content

Commit

Permalink
Remove unused PKIServer.add_rewrite_valve()
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Nov 13, 2023
1 parent 7405a0e commit 0222dc4
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions base/server/python/pki/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,23 +803,6 @@ def create_server_xml(self):

pki.util.chown(self.server_xml, self.uid, self.gid)

@staticmethod
def add_rewrite_valve(document):
REWRITE_VALVE_CLASS = "org.apache.catalina.valves.rewrite.RewriteValve"
logger.info('Searching for RewriteValves')
for host in document.getroot().findall('Service/Engine/Host'):
logger.info('Found Host %s', host.get('name'))
valves = host.findall('Valve')
has_rewrite_valve = any(
valve.get('className') == REWRITE_VALVE_CLASS
for valve in valves
)
if not has_rewrite_valve:
logger.info('Adding RewriteValve')
valve = etree.Element('Valve')
valve.set('className', REWRITE_VALVE_CLASS)
host.append(valve)

def create_libs(self, force=False): # pylint: disable=W0613

lib_dir = os.path.join(PKIServer.SHARE_DIR, 'server', 'lib')
Expand Down

0 comments on commit 0222dc4

Please sign in to comment.