from fastapi import FastAPI app = FastAPI() # @app.get('/') # def read_root(): # return {"message": "Hello, World!"} # redirect to 127.0.0.1 @app.get('/') def redirect_to_localhost(): return {"redirect": "http://127.0.0.1:5678"}