use relative path to api instead of absolute path so that it works behind reverse proxies