How do you host your app? It looks like the issue could be related to a reverse proxy.
If you use On-premise deployment on Windows, fronted by IIS, follow these steps exactly, It worked for me:
https://docs.mendix.com/developerportal/deploy/deploy-mendix-on-microsoft-windows/#rule-add-x-forwarded-proto-header