Api redirect without Urlbase

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS: ubuntu 20 lts
Debug logs:
Description of issue: some endpoints like qualityprofile which isn’t fetched on v3 redirects to profile endpoint without Urlbase
Any fix for this?

Had to workaround by checking locations url prefix in headers and if its equal to Urlbase , then fetch it otherwise add explicit prefix (eg /sonarr) on client side