Refactors Project for More Declarative Package Name
This commit is contained in:
19
storage_service/controller/__init__.py
Normal file
19
storage_service/controller/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from storage_service.config.config_allowed_origins import get_allowed_origins
|
||||
from storage_service.controller.storage_controller import s3_router
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=get_allowed_origins(),
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
app.include_router(s3_router)
|
||||
Reference in New Issue
Block a user