The current logic of util_current_location is already influenced by two other package parameters, it is not a good idea to hack in just another parameter that overrules its behavior for this proc.
The logic of util_current_location was already quite complex and redundant, so i took the opportunity to refactor it to make it clearer and to implement, what is written actually in the comment of the function. I have as well added several comments to the code.
util_current_location is controlled via "ReverseProxyMode" and "SuppressHttpPort". When the server is running behind a Proxy (like nginx), it should be sufficient to set ReverseProxyMode to true (there won't be a port returned in the result unless required due to the host header field. The protocol will be correctly determined, when the reverse proxy (e.g. nginx) sets "X-SSL-Request" as required.
If - for some unknown reason - it is still required to suppress the port in all requests, also the package parameter "SuppressHttpPort" can be used.
Is there any case not covered required by ]po[? Please check the new code.