#NEWLINE# def origin( self , request ) : #NEWLINE# #INDENT# 'Handles request authentication\n        ' #NEWLINE# response = request . response #NEWLINE# origin = request . get ( 'HTTP_ORIGIN' , '*' ) #NEWLINE# if ( origin == 'null' ) : #NEWLINE# #INDENT# origin = '*' #NEWLINE# #UNINDENT# response [ 'Access-Control-Allow-Origin' ] = origin #NEWLINE# headers = request . get ( 'HTTP_ACCESS_CONTROL_REQUEST_HEADERS' ) #NEWLINE# if headers : #NEWLINE# #INDENT# response [ 'Access-Control-Allow-Headers' ] = headers #NEWLINE# #UNINDENT# response [ 'Access-Control-Allow-Credentials' ] = 'true'