"""
FastAPI routing configuration.
Maps incoming HTTP requests to the FastAPIProxyRedirect class.
"""
from fastapi import FastAPI, Request
from fast_api import FastAPIProxyRedirect
app = FastAPI()
@app.get("/{full_path:path}")
async def proxy_handler(request: Request):
"""
Catch-all route that passes the request to the proxy logic and returns the response.
"""
proxy = FastAPIProxyRedirect(request)
return proxy.get_response()