Browse Source

style: 使用ruff格式化middlewares模块,优化导入

master
insistence 7 months ago
parent
commit
44af38612c
  1. 8
      ruoyi-fastapi-backend/middlewares/cors_middleware.py

8
ruoyi-fastapi-backend/middlewares/cors_middleware.py

@ -5,8 +5,8 @@ from fastapi.middleware.cors import CORSMiddleware
def add_cors_middleware(app: FastAPI):
# 前端页面url
origins = [
"http://localhost:80",
"http://127.0.0.1:80",
'http://localhost:80',
'http://127.0.0.1:80',
]
# 后台api允许跨域
@ -14,6 +14,6 @@ def add_cors_middleware(app: FastAPI):
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
allow_methods=['*'],
allow_headers=['*'],
)

Loading…
Cancel
Save