Skip to content

Commit

Permalink
frontend: resource controller skip scriptElement
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Jun 2, 2020
1 parent f95d9bf commit 70c33b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shopfloor_mobile/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ class ShopfloorMobileAppController(http.Controller):
)
def load_app_and_assets(self, path_fragment=""):
# TODO Should be authorized via api.key except for the login ?
if path_fragment.endswith(".js.map"):
# do not bother us w/ JS maps for now (avoid FileNotFoundError)
if path_fragment.endswith((".js.map", "scriptElement")):
# `js.map` -> JS maps called by debugger
# `scriptElement` -> file imported via JS but not loaded
return http.request.not_found()
if path_fragment.startswith("src/"):
# Serving an asset
Expand Down

0 comments on commit 70c33b8

Please sign in to comment.