There is a difference in how the application url is being configured between your local machine and the cloud.
In your project settings (project explorer / Settings / environment) you have the localhost url specified. This URL ends with a / (problably http://localhost:8080/)
The cloud is configured differently, the URL for the application in the cloud is configured as: https://myapp.mxapps.io without the slash.
So if you would do url + suffix and suffix is: link/author/
ocally that would make http://localhost:8080/link/author/
but in the cloud that makes: https://myapp.mxapps.iolink/author/
The best most reliable way is that you'd check does the url already end with a slash if not( endsWith( $url, '/' ) ) then $url + '/' else $url
But the quickest way to get the same behavior locally and in the cloud is to remove the / from the url in your local environment settings.