Using the X-Forwarded-Proto header of the HTTP request, changes the web server’s rewrite rule to apply only if the client protocol is HTTP and ignore the rewrite rule for all other protocols used by the client. This solved my issue and hopefully will help others.
Further on, the question is if would be possible to have this written somewhere in the cuba-platform files and have this line generated into server.xml during deployment. I’m new to cuba-platform, so I’m not sure if my question make sense.
Thank you for your valuable solution, Gabriel! We’ll add this to our documentation. In the near future we are planning to add How-to category, so I think your post will appear there one of the first.