Hello everyone! First time user of Balena here
I have setup a Ktor application and deployed it on an RPi-4. I have a Docker image that I am building locally by extending
balenalib/raspberrypi3-openjdk:8-jdk since there is no JDK one for RPi-4 that I have found.
The application is deployed correctly, but needs an
iptables port forwarding in order to redirect the port 80 to port 8080, since you can not listen on port 80 due to Linux permissions for ports lower than 1024, which makes Netty crash with permission denied.
Thus far everything is fine, although there seems to be a load balancer in front of the public URL of a device, which causes repeated redirects, causing the application to not respond. On several load balancers or reverse-proxies there seems to be special request headers preventing those issues and I was able to resolve this issue in Google Cloud Run for example, by utilizing Ktor’s feature https://ktor.io/quickstart/faq.html#infinite-redirect
This seems to not be the case for balenaOS though, since the redirects do not stop. Is there anyone who can give me a hint on what I might be missing?
Thanks in advance