You could try env REQUEST_URI {uri}
env REQUEST_URI {uri}
Consider reporting this issue to Nextcloud for them to fix it.