Fix JS implementation of pagination, and fix URLs returned in link headers

Merge request reports