There should be a feature to configure the way nextcloud generates public links when sharing - for custom domain and schema to make them unrelated to the current URL used to access the website.
I do access nextcloud frontend via http, but still my public links are https. My public instance is the TLS termination point, but the connection is forwarded to nextcloud on http port through VPN. Public links are for sharing to world, but i intentionally use http myself to upload because the server is in my local network and uploads must go directly for me.
Yes that is the way it is. We create links via method and url the current user is running as.
You could try to fix this by overwriting your url in the local dns. But this is out of scope for Nextcloud.
Erkkh... Can you explain why an option to change share-only domain and protocol cannot be added to nextcloud?
This should not be closed and must be feature request with larger discussion
So who's setting the scope?
Please use the feature request template to request a feature. I think there is only a little chance that someone will build such a feature.
It might be easier to update your initial post with the information from the feature request template. I will set the right labels and reopen.
Thank you, it's done.
No. This is error prone and will introduce code not tested by more than a few people while introducing a shitload of config options. We always try to keep the config options to a minium an work with sane defaults.
You should always use TLS. Even for the local network. The overhead is negligible compared to the php overhead etc.
If you really want to run in an unrecommended setup you should change the links yourself. Or login to the public facing website to copy them.
I do access the web frontend via https but still my public links are http. My instance is behind an nginx reverse proxy, which is the tls termination point. Are there any special nginx configuration options required that I missed?
@kesselb Thanks for the link! I added 'overwriteprotocol' => 'https', to my config.php and it works. Now both the web frontend and the android app generate https links. (Note: I already had 'overwrite.cli.url' => 'https://my-host.com/my-installdir', but that is not sufficient.)
For nginx as reserve proxy it should be enough to add the ip of your reverse proxy to trusted_proxies but overwriteprotocol is fine too.