MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / build_absolute_uri_with_port

Function build_absolute_uri_with_port

core/utils.py:1014–1023  ·  view source on GitHub ↗

Build an absolute URI with optional port. Port is omitted from URL if None (standard port for scheme).

(request, path)

Source from the content-addressed store, hash-verified

1012
1013
1014def build_absolute_uri_with_port(request, path):
1015 """
1016 Build an absolute URI with optional port.
1017 Port is omitted from URL if None (standard port for scheme).
1018 """
1019 host, port = get_host_and_port(request)
1020 scheme = request.META.get("HTTP_X_FORWARDED_PROTO", request.scheme)
1021 if port:
1022 return f"{scheme}://{host}:{port}{path}"
1023 return f"{scheme}://{host}{path}"
1024
1025
1026def send_notification_dismissed(notification_key):

Callers 15

epg_generatorFunction · 0.90
generate_m3uFunction · 0.90
_xc_live_streams_setupFunction · 0.90
xc_get_vod_streamsFunction · 0.90
xc_get_seriesFunction · 0.90
xc_get_series_infoFunction · 0.90
xc_get_vod_infoFunction · 0.90
get_cache_urlMethod · 0.90
to_representationMethod · 0.90
getMethod · 0.90
getMethod · 0.90
getMethod · 0.90

Calls 2

get_host_and_portFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected