Hi @andret889 and welcome to the RStudio Community!!
Apologies for the delay getting back to you here! Are you still running into issues? For a more expedited response, it may be worth shooting an email to support@rstudio.com so that our Professional Support team can get you sorted!
In the meantime, this looks a lot like the protocol or host that is getting forwarded to RStudio Connect (by a load balancer or proxy) is not getting set properly.
For this purpose, we use the X-Forwarded-Host and X-Forwarded-Proto headers. There are a handful of problems that can crop up if these are not set properly, and there is an "escape hatch" header (X-RSC-Request) that can be used. (This is one such problem, and they often give this same feeling of "everything else works," which makes debugging subtly challenging! You are not alone!)
We talk more about the process here: Running with a Proxy - RStudio Connect: Admin Guide
Can you say a bit more about how traffic reaches your Connect host / cluster? Is there a load balancer or proxy in play? Is it listening at the root path (/) or are you rewriting paths? Do users access with TLS/SSL/https? Does Connect also listen in TLS/SSL/https, or does the proxy terminate the TLS connection?