style: 优化添加中间件函数注释

This commit is contained in:
insistence
2024-08-08 09:20:57 +08:00
parent d49d05b776
commit ca6668331f
2 changed files with 12 additions and 0 deletions

View File

@@ -3,6 +3,12 @@ from fastapi.middleware.cors import CORSMiddleware
def add_cors_middleware(app: FastAPI):
"""
添加跨域中间件
:param app: FastAPI对象
:return:
"""
# 前端页面url
origins = [
'http://localhost:80',