#NEWLINE# def process_response( self , request , response ) : #NEWLINE# #INDENT# '\n        Add the CORS headers and API discovery header for clients\n        ' #NEWLINE# response [ 'X-Api-Discovery' ] = request . build_absolute_uri ( reverse ( 'api-root' ) ) #NEWLINE# if self . is_api_request ( request ) : #NEWLINE# #INDENT# if settings . MZN_API_CORS_ORIGIN_ALLOW_ALL : #NEWLINE# #INDENT# response [ 'Access-Control-Allow-Origin' ] = '*' #NEWLINE# #UNINDENT# if ( request . method == 'OPTIONS' ) : #NEWLINE# #INDENT# response [ 'Access-Control-Allow-Headers' ] = ', ' . join ( settings . MZN_API_CORS_ALLOW_HEADERS ) #NEWLINE# response [ 'Access-Control-Allow-Methods' ] = ', ' . join ( settings . MZN_API_CORS_ALLOW_METHODS ) #NEWLINE# #UNINDENT# #UNINDENT# return response