AnonymousSpottedToad/securityPatternsRecovery / codebase /repos /python /aspuru-guzik-group_molar /molar /backend /main.py
| # external | |
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| # molar | |
| from molar import __version__ | |
| from .api.api_v1.api import api_router | |
| from .core.config import settings | |
| app = FastAPI( | |
| title="Molar 🦷", | |
| version=__version__, | |
| openapi_url=f"{settings.API_V1_STR}/openapi.json", | |
| ) | |
| # Set all CORS enabled origins | |
| if settings.BACKEND_CORS_ORIGINS: | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| app.include_router(api_router, prefix=settings.API_V1_STR) | |
Xet Storage Details
- Size:
- 676 Bytes
- Xet hash:
- 3ea4e9a6bc51f7d773b5d1d191df75d23ec0dc42e75d0549f632cb63ac3a450b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.