Skip to content

Commit 144ef08

Browse files
fix(cors): correct CORS resource pattern for /console/api routes (#31485)
Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
1 parent 1125961 commit 144ef08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/extensions/ext_fastopenapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def init_app(app: DifyApp) -> None:
3636
router.include_router(console_router, prefix="/console/api")
3737
CORS(
3838
app,
39-
resources={r"/console/api/*": {"origins": dify_config.CONSOLE_CORS_ALLOW_ORIGINS}},
39+
resources={r"/console/api/.*": {"origins": dify_config.CONSOLE_CORS_ALLOW_ORIGINS}},
4040
supports_credentials=True,
4141
allow_headers=list(AUTHENTICATED_HEADERS),
4242
methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],

0 commit comments

Comments
 (0)