Skip to content

Commit

Permalink
Update auth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Dec 13, 2023
1 parent 3d58a5a commit cb04472
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flask-app/application/modules/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ def validateBasicAuth():
def getReqHost():
if has_request_context():
return str(request.host).strip().split(':')[0]


def getReqOrigin():
if has_request_context():
if request.origin:
origin = str(request.origin).strip().strip('https://').strip('http://')
return origin.split(':')[0]


def validateRequest(scope=None, token=None):
Expand Down

0 comments on commit cb04472

Please sign in to comment.