Installed NextcloudPi on a Raspberry Pi 4 running Ubuntu 64-bit.
ISP blocks port 443, so used nginx to listen for SSL on port 444.
Can access nextcloud with nextcloud.domain.tld:444 from the internet.
But, whenever I get a response from the nextcloud server, it removes the port 444 and the page breaks. I have to manually add the :444 everytime. This is an inconvenience but not a deal breaker.
The real issue comes when I’m trying to grant access to apps to my nextcloud instance (floccus, antennapod, etc). I start the process and it redirects me to the login page(w/out the :444, which I add manually and it works). On the Grant Access page, the form is blocked by Content Security Policy presumably because the POST request it is sending doesn’t contain the :444 whereas the url of the page does. No problem, I edit the html and click the grant access button. I am redirected successfully to the access granted page— but, the floccus app doesn’t register it.
In fact, the very first time it opens the page, I get the “NetworkError when attempting to fetch resource.” on the floccus page itself.
Why is this happening?
How can I solve it so that, my server always returns the domain with the port number 444?