from mediagoblin.tools.routing import endpoint_to_controller
from werkzeug.wrappers import Request
-from werkzeug.exceptions import HTTPException, NotFound
+from werkzeug.exceptions import HTTPException
from werkzeug.routing import RequestRedirect
from mediagoblin import meddleware, __version__
mgoblin_app = MediaGoblinApp(mediagoblin_config)
+ for callable_hook in PluginManager().get_hook_callables('wrap_wsgi'):
+ mgoblin_app = callable_hook(mgoblin_app)
+
return mgoblin_app