Merge pull request #5904 from netchampfaris/get-url-fix
Pick port from webserver_port in get_url
This commit is contained in:
commit
189cea3339
1 changed files with 4 additions and 2 deletions
|
|
@ -713,8 +713,10 @@ def get_url(uri=None, full_address=False):
|
|||
if not uri and full_address:
|
||||
uri = frappe.get_request_header("REQUEST_URI", "")
|
||||
|
||||
if frappe.conf.http_port:
|
||||
host_name = host_name + ':' + str(frappe.conf.http_port)
|
||||
port = frappe.conf.http_port or frappe.conf.webserver_port
|
||||
|
||||
if host_name and ':' not in host_name and port:
|
||||
host_name = host_name + ':' + str(port)
|
||||
|
||||
url = urljoin(host_name, uri) if uri else host_name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue