fix!: Only use webserver_port in developer mode (#26268)
This commit is contained in:
parent
72b1db0ae5
commit
ee64b2cb6c
3 changed files with 9 additions and 5 deletions
|
|
@ -1331,7 +1331,10 @@ def start_ngrok(context, bind_tls, use_default_authtoken):
|
|||
|
||||
ngrok.set_auth_token(ngrok_authtoken)
|
||||
|
||||
port = frappe.conf.http_port or frappe.conf.webserver_port
|
||||
port = frappe.conf.http_port
|
||||
if not port and frappe.conf.developer_mode:
|
||||
port = frappe.conf.webserver_port
|
||||
|
||||
tunnel = ngrok.connect(addr=str(port), host_header=site, bind_tls=bind_tls)
|
||||
print(f"Public URL: {tunnel.public_url}")
|
||||
print("Inspect logs at http://127.0.0.1:4040")
|
||||
|
|
|
|||
|
|
@ -1777,9 +1777,12 @@ def get_url(uri: str | None = None, full_address: bool = False) -> str:
|
|||
if not uri and full_address:
|
||||
uri = frappe.get_request_header("REQUEST_URI", "")
|
||||
|
||||
port = frappe.conf.http_port or frappe.conf.webserver_port
|
||||
port = frappe.conf.http_port
|
||||
if not port and frappe.conf.developer_mode:
|
||||
port = frappe.conf.webserver_port
|
||||
|
||||
if (
|
||||
# XXX: This config is used as proxy for "is production mode enabled?"
|
||||
not frappe.conf.restart_supervisor_on_update
|
||||
and not frappe.conf.restart_systemd_on_update
|
||||
and host_name
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ function get_url(socket, path) {
|
|||
let url = socket.request.headers.origin;
|
||||
if (conf.developer_mode) {
|
||||
let [protocol, host, port] = url.split(":");
|
||||
if (port != conf.webserver_port) {
|
||||
port = conf.webserver_port;
|
||||
}
|
||||
port = conf.webserver_port;
|
||||
url = `${protocol}:${host}:${port}`;
|
||||
}
|
||||
return url + path;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue