File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2323 swagger_ui_parameters = swagger_params ,
2424)
2525
26- origins = [get_settings ().allow_origins ]
26+ origins_from_settings = get_settings ().allow_origins
27+
28+ if origins_from_settings is None :
29+ origins_from_settings = ".*"
2730
2831app .add_middleware (
2932 CORSMiddleware ,
30- allow_origins = origins ,
33+ allow_origin_regex = origins_from_settings ,
3134 allow_credentials = True ,
3235 allow_methods = ["*" ],
3336 allow_headers = ["*" ],
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ VITE_APP_API_HOST=localhost
3636VITE_APP_API_URL=https://localhost/api
3737
3838# ALLOW_ORIGINS=${VITE_APP_ORIGIN}
39- ALLOW_ORIGINS=http:// localhost:5173
39+ ALLOW_ORIGINS=.* localhost.*'
4040
4141# OAUTH2_REDIRECT_URL=${VITE_APP_API_URL}/auth/cuahsi/callback
4242OAUTH2_REDIRECT_URL=https://localhost/api/auth/cuahsi/callback
You can’t perform that action at this time.
0 commit comments