Skip to content

Commit

Permalink
Use configurables to set header values
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-bates committed Mar 2, 2023
1 parent 89aac05 commit 442ec70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel_gateway/services/sessions/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class SessionHandler(TokenAuthorizationMixin,
"""
def set_default_headers(self):
self.set_header('Content-Type', 'application/json')
self.set_header('Access-Control-Allow-Origin', '*')
self.set_header('Access-Control-Allow-Headers', 'content-type')
self.set_header('Access-Control-Allow-Methods', 'DELETE')
self.set_header('Access-Control-Allow-Origin', self.settings['kg_allow_origin'])
self.set_header('Access-Control-Allow-Headers', self.settings['kg_allow_headers'])
self.set_header('Access-Control-Allow-Methods', self.settings['kg_allow_methods'])

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

0 comments on commit 442ec70

Please sign in to comment.