Adding code to verify origin of the request.