Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Krish Moodbidri
self-reg-form
Commits
d92ae68b
Commit
d92ae68b
authored
Aug 13, 2021
by
Krish Moodbidri
Browse files
replaced cors_allowed_origins value with avriable from vars
parent
7d4bc719
Pipeline
#4995
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/__init__.py
View file @
d92ae68b
...
...
@@ -15,7 +15,7 @@ import json
def
create_app
(
config_name
):
app
=
Flask
(
__name__
,
static_folder
=
'static'
)
# initialization of the flask app
cors
=
CORS
(
app
,
resources
=
{
r
"/*"
:
{
"origins"
:
"https://testshib1.dev.rc.uab.edu/"
}})
cors
=
CORS
(
app
,
resources
=
{
r
"/*"
:
{
"origins"
:
vars
.
cors_allowed_origins
}})
Bootstrap
(
app
)
# allowing app to use bootstrap
def
get_authorized_user
():
...
...
run.py
View file @
d92ae68b
...
...
@@ -14,7 +14,7 @@ monkey.patch_all(subprocess=True)
config_name
=
os
.
getenv
(
'FLASK_CONFIG'
)
app
=
create_app
(
config_name
)
app
.
config
[
'SECRET_KEY'
]
=
vars
.
key
socketio
=
SocketIO
(
app
,
cors_allowed_origins
=
"https://testshib1.dev.rc.uab.edu"
,
message_queue
=
vars
.
message_queue
)
socketio
=
SocketIO
(
app
,
cors_allowed_origins
=
vars
.
cors_allowed_origins
,
message_queue
=
vars
.
message_queue
)
@
socketio
.
on
(
'join_room'
)
def
on_room
(
json
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment