mirror of
https://github.com/myronblair/infra
synced 2026-06-30 17:50:10 -05:00
52f6073593
AI context/memory from Claude Code sessions covering all infrastructure: JARVIS, NovaCPX, DO sites, Proxmox, FusionPBX, MediaStack, and project feedback/preferences.
1.7 KiB
1.7 KiB
name, description, metadata
| name | description | metadata | ||||||
|---|---|---|---|---|---|---|---|---|
| feedback-cloudflare-rocket-loader | Cloudflare Rocket Loader breaks inline JS event handlers and defers scripts — how to avoid and fix |
|
Cloudflare Rocket Loader is enabled on all orbishosting.com sites and causes two distinct problems:
-
Script deferral — changes
<script>tag type to a fake value, preventing execution until Rocket Loader finishes loading. Breaks any JS that must run on page load. -
Inline handler blocking — injects
if (!window.__cfRLUnblockHandlers) return false;into everyonclick=,onkeydown=, etc. HTML attribute. Even if the function is defined, the click is blocked.
Why: These are Cloudflare "performance optimizations" that can't be disabled without Cloudflare dashboard access (no API keys stored).
How to apply: For any page with JavaScript that must work:
- Add
Cache-Control: no-transform, no-storeresponse header — this tells Cloudflare not to modify the response. Useini_set('session.cache_limiter', '')before session_start() or the session headers will override it. - Never use inline event handler attributes (
onclick=,onkeydown=). Always useaddEventListener(). - The main JARVIS app (jarvis.orbishosting.com) is now served via
index.phpwhich adds this header automatically.
Current solution (2026-06-01):
- Login:
login.php(pure PHP form POST, no JS) withCache-Control: no-transform - Entry point:
index.phpchecks PHP session, redirects tologin.phpif not auth'd - App served with token injected as
var __jarvisTokenglobal + CSS forcing loginScreen hidden - See project-jarvis for full architecture