Fix nginx /api routing if root url is not '/'
Fix convert urls behind reverse proxy with prefix