Fix domain check for security to use Config values