Improve resource path registration

We cannot rely on $IP for determining path