mercurial/hgweb/hgweb_mod.py
branchstable
changeset 48796 c00d3ce4e94b
parent 48526 04688c51f81f
child 48875 6000f5b25c9b
--- a/mercurial/hgweb/hgweb_mod.py	Fri Feb 18 12:55:39 2022 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Fri Feb 18 14:27:43 2022 +0100
@@ -366,17 +366,6 @@
             # replace it.
             res.headers[b'Content-Security-Policy'] = rctx.csp
 
-        # /api/* is reserved for various API implementations. Dispatch
-        # accordingly. But URL paths can conflict with subrepos and virtual
-        # repos in hgwebdir. So until we have a workaround for this, only
-        # expose the URLs if the feature is enabled.
-        apienabled = rctx.repo.ui.configbool(b'experimental', b'web.apiserver')
-        if apienabled and req.dispatchparts and req.dispatchparts[0] == b'api':
-            wireprotoserver.handlewsgiapirequest(
-                rctx, req, res, self.check_perm
-            )
-            return res.sendresponse()
-
         handled = wireprotoserver.handlewsgirequest(
             rctx, req, res, self.check_perm
         )