implemented the checking against the permitted domains list