Open daften opened 3 years ago
I get that error from https://github.com/Forceu/barcodebuddy-android/issues/4, because the redirect isn't followed in the app it seems. But if the URL generated from the BCB UI would be correct, it would be fine too :)
Is this related to the Docker nginx configuration or the Barcode Buddy example file? Because it is already set in https://github.com/Forceu/barcodebuddy/blob/2ca740956d3072baa2bc1767caf61e32285a4fd0/example/nginxReverseProxy.conf#L22
It's related to the docker nginx configuration. If you look at the URL on the "add mobile app" page, you see that it uses http if behind a reverse proxy that uses X-Forwarded-Proto, because nowhere is the HTTPS env variable set to on. I know how to do that in a htaccess file, not for nginx (which is used in the docker container) unfortunately. But I'm guessing it must be possible. The URL can be changed manually, but it's easy to look over this and I think many people will make a mistake against this and run into a wall :)
By default nginx doesn't use the X-Forwarded-Proto header to set the HTTPS entry in the S_SERVER global array. By updating the default nginx file, that could be remedied. For apache SetEnvIf can be used in a htaccess file, for nginx, no idea what the best approach is tbh.