If it's a private function, how to set the directive in CSPHandler except to declare a friend class?