| 221 | dash_app._add_url("", index, methods=["GET"]) |
| 222 | |
| 223 | def setup_catchall(self, dash_app: Dash): |
| 224 | async def catchall( |
| 225 | path: str, *args, **kwargs |
| 226 | ): # noqa: ARG001 - path is unused but kept for route signature, pylint: disable=unused-argument |
| 227 | return Response(dash_app.index(*args, **kwargs), content_type="text/html") # type: ignore[arg-type] |
| 228 | |
| 229 | # pylint: disable=protected-access |
| 230 | dash_app._add_url("<path:path>", catchall, methods=["GET"]) |
| 231 | |
| 232 | def before_request(self, func: _t.Callable[[], _t.Any]): |
| 233 | self.server.before_request(func) |