Add installable PWA (Option A — iPhone-first, no service worker)
Make the app installable to the iOS home screen and launch standalone (full-screen, no browser chrome, dark status bar). Add manifest.webmanifest, square app icons (ten31-app-icon.svg -> 192/512/apple-touch-icon), the apple-mobile-web-app + manifest <head> tags, viewport-fit=cover, and a pre-auth /manifest.webmanifest route. No service worker by design.
This commit is contained in:
@@ -2226,6 +2226,11 @@ class CRMHandler(BaseHTTPRequestHandler):
|
||||
# Serve frontend
|
||||
if path == '/' or path == '/index.html':
|
||||
return self.send_file(os.path.join(FRONTEND_DIR, 'index.html'))
|
||||
# PWA manifest — served at root (manifest scope = its own path's directory) and
|
||||
# pre-auth, since the browser fetches it (and the icons under /assets/) before login
|
||||
# to offer "Add to Home Screen". No service worker (iOS-first; see ROADMAP).
|
||||
if path == '/manifest.webmanifest':
|
||||
return self.send_file(os.path.join(FRONTEND_DIR, 'manifest.webmanifest'), 'application/manifest+json')
|
||||
if path.startswith('/assets/'):
|
||||
filepath = os.path.join(FRONTEND_DIR, path.lstrip('/'))
|
||||
# Containment check: get_path()/urlparse does NOT normalize '..', so without
|
||||
|
||||
Reference in New Issue
Block a user