Serverless Apps with FastAPI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718
  1. from fastapi import FastAPI
  2. from fastapi.middleware.cors import CORSMiddleware
  3. app = FastAPI()
  4. app.add_middleware(
  5. CORSMiddleware,
  6. allow_origins="*",
  7. allow_credentials=True,
  8. allow_methods=["*"],
  9. allow_headers=["*"],
  10. )
  11. @app.get("/api/health-check/")
  12. def health_check():
  13. return {"message": "OK"}