add logs for tracing processing task
This commit is contained in:
1 parent
efddee217a
commit
073777081e
81 files changed
+25300
-24561
No files matched your search
+24
-24
@@ -1,24 +1,24 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from config import cors_settings
|
||||
|
||||
# sys.path.append(
|
||||
# os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# ) # root 경로 추가
|
||||
|
||||
|
||||
class CustomCORSMiddleware:
|
||||
def __init__(self, app: FastAPI):
|
||||
self.app = app
|
||||
|
||||
def configure_cors(self):
|
||||
self.app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=cors_settings.CORS_ALLOW_ORIGINS,
|
||||
allow_credentials=cors_settings.CORS_ALLOW_CREDENTIALS,
|
||||
allow_methods=cors_settings.CORS_ALLOW_METHODS,
|
||||
allow_headers=cors_settings.CORS_ALLOW_HEADERS,
|
||||
expose_headers=cors_settings.CORS_EXPOSE_HEADERS,
|
||||
max_age=cors_settings.CORS_MAX_AGE,
|
||||
)
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from config import cors_settings
|
||||
|
||||
# sys.path.append(
|
||||
# os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# ) # root 경로 추가
|
||||
|
||||
|
||||
class CustomCORSMiddleware:
|
||||
def __init__(self, app: FastAPI):
|
||||
self.app = app
|
||||
|
||||
def configure_cors(self):
|
||||
self.app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=cors_settings.CORS_ALLOW_ORIGINS,
|
||||
allow_credentials=cors_settings.CORS_ALLOW_CREDENTIALS,
|
||||
allow_methods=cors_settings.CORS_ALLOW_METHODS,
|
||||
allow_headers=cors_settings.CORS_ALLOW_HEADERS,
|
||||
expose_headers=cors_settings.CORS_EXPOSE_HEADERS,
|
||||
max_age=cors_settings.CORS_MAX_AGE,
|
||||
)
|
||||
Reference in new issue
Block a user