Use principal URI instead of origin
(Not TODO anymore)