Add global autofill guard for hub, env, and transfer inputs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -777,6 +777,17 @@ _ACCOUNT_RISK_BADGE_CSS = _REPO_STATIC / "account_risk_badge.css"
|
||||
_ACCOUNT_RISK_BADGE_JS = _REPO_STATIC / "account_risk_badge.js"
|
||||
_OPTIONS_EXPIRY_COUNTDOWN_JS = _REPO_STATIC / "options_expiry_countdown.js"
|
||||
_OPTIONS_POSITION_CARDS_JS = _REPO_STATIC / "options_position_cards.js"
|
||||
_AUTOFILL_GUARD_JS = _REPO_STATIC / "autofill_guard.js"
|
||||
|
||||
|
||||
@app.get("/assets/autofill_guard.js")
|
||||
def hub_autofill_guard_js():
|
||||
if not _AUTOFILL_GUARD_JS.is_file():
|
||||
raise HTTPException(status_code=404, detail="autofill_guard.js not found")
|
||||
return FileResponse(
|
||||
str(_AUTOFILL_GUARD_JS),
|
||||
media_type="application/javascript; charset=utf-8",
|
||||
)
|
||||
|
||||
|
||||
@app.get("/assets/account_risk_badge.css")
|
||||
|
||||
Reference in New Issue
Block a user