def _add_cors(api: Starlette):
        """Add CORS middleware to the app.

        Args:
            api: The Starlette app to add CORS middleware to.
        """
        api.add_middleware(
            cors.CORSMiddleware,
            allow_credentials=True,
            allow_methods=["*"],
            allow_headers=["*"],
            allow_origins=get_config().cors_allowed_origins,
        )
Add CORS middleware to the app.

        Args:
            api: The Starlette app to add CORS middleware to.
        
reflex/app.py