def METHOD_NAME(app):
    csp_hashes = None
    try:
        with app.open_resource("../common/web/csp-hashes.json") as f:
            csp_hashes = json.load(f)
    except FileNotFoundError:
        pass
    if not isinstance(csp_hashes, dict):
        csp_hashes = {}
    script_hashes = [f"'{hash}'" for hash in csp_hashes.get("script-hashes", [])]
    if len(script_hashes) == 0:
        logging.error("Content security policy hashes are missing, falling back to unsafe-inline policy")
    return script_hashes