from fastapi import FastAPI, Depends from fastapi.middleware.cors import CORSMiddleware import uvicorn app = FastAPI() '''origins = [ "http://localhost:3000", "localhost:3000", "https://devwithagnes.website", "devwithagnes.website", "https://frontend.devwithagnes.website", "frontend.devwithagnes.website" ]''' origins = [ "*" ] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], expose_headers=["*"] ) @app.get('/') async def root()-> dict: return {'message': 'Hello From Polaris Frequency Again!'} if __name__ == "__main__": #uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True) uvicorn.run("main:app", host="0.0.0.0", port=80, reload=True)