fix: skip preloading bundled assets if http_status_code is 404
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
This commit is contained in:
parent
217debdcfc
commit
85bcc372e7
1 changed files with 2 additions and 1 deletions
|
|
@ -557,7 +557,8 @@ def build_response(path, data, http_status_code, headers: dict | None = None):
|
|||
response.headers["X-Page-Name"] = cstr(cstr(path).encode("ascii", errors="xmlcharrefreplace"))
|
||||
response.headers["X-From-Cache"] = frappe.local.response.from_cache or False
|
||||
|
||||
add_preload_for_bundled_assets(response)
|
||||
if http_status_code != 404:
|
||||
add_preload_for_bundled_assets(response)
|
||||
|
||||
if headers:
|
||||
for key, val in headers.items():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue