|
|
@@ -3,6 +3,7 @@
|
|
|
# github https://github.com/runhey
|
|
|
import argparse
|
|
|
from fastapi import FastAPI
|
|
|
+from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
|
|
from module.logger import logger
|
|
|
|
|
|
@@ -14,6 +15,15 @@ app = FastAPI(
|
|
|
description='OAS web service',
|
|
|
version='0.0.0',
|
|
|
)
|
|
|
+
|
|
|
+app.add_middleware(
|
|
|
+ CORSMiddleware,
|
|
|
+ allow_origins=["*"],
|
|
|
+ allow_credentials=True,
|
|
|
+ allow_methods=["*"],
|
|
|
+ allow_headers=["*"]
|
|
|
+)
|
|
|
+
|
|
|
app.include_router(home_app)
|
|
|
app.include_router(script_app)
|
|
|
|