Skip to content

Commit 442ec70

Browse files
committed
Use configurables to set header values
1 parent 89aac05 commit 442ec70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel_gateway/services/sessions/handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class SessionHandler(TokenAuthorizationMixin,
3636
"""
3737
def set_default_headers(self):
3838
self.set_header('Content-Type', 'application/json')
39-
self.set_header('Access-Control-Allow-Origin', '*')
40-
self.set_header('Access-Control-Allow-Headers', 'content-type')
41-
self.set_header('Access-Control-Allow-Methods', 'DELETE')
39+
self.set_header('Access-Control-Allow-Origin', self.settings['kg_allow_origin'])
40+
self.set_header('Access-Control-Allow-Headers', self.settings['kg_allow_headers'])
41+
self.set_header('Access-Control-Allow-Methods', self.settings['kg_allow_methods'])
4242

4343
def options(self, **kwargs):
4444
"""Method for properly handling CORS pre-flight"""

0 commit comments

Comments
 (0)