#NEWLINE# def is_internal_request( self , domain , referer ) : #NEWLINE# #INDENT# '\n        Returns True if the referring URL is the same domain as the current request.\n        ' #NEWLINE# return bool ( re . match ( ( '^https?://%s/' % re . escape ( domain ) ) , self ) )