Android(TWA) 앱 패키징 + 재실행 불가 버그 수정

Cloudflare Pages 가 /index.html 을 / 로 308 리다이렉트하는데, 서비스워커가
그 리다이렉트 응답을 캐시해 두면 navigation 요청에 응답할 수 없어(스펙상 금지)
두 번째 실행부터 ERR_FAILED 로 앱이 아예 열리지 않았다.

- sw.js: navigation 은 네트워크 우선 + 캐시된 './' 오프라인 폴백,
  프리캐시는 리다이렉트 플래그 없는 새 Response 로 복사해 저장 (tetrig-v2)
- manifest.webmanifest: start_url 을 './' 로 바꿔 리다이렉트 자체를 회피
- android/: Bubblewrap TWA 프로젝트 (kr.tkrmagid.tetrig, launchUrl '/')
- .well-known/assetlinks.json: 서명 키 SHA-256 등록 → 주소창 없는 전체화면 실행
This commit is contained in:
2026-09-23 04:30:10 +09:00
parent c9463fe46b
commit 0839705b97
46 changed files with 1177 additions and 8 deletions

View File

@@ -0,0 +1 @@
{"name":"TETRIG","short_name":"TETRIG","description":"실시간 대전 블록 스태커 — 솔로·커스텀·랭크 리그전","lang":"ko","start_url":"/index.html","scope":"./","display":"standalone","orientation":"portrait","background_color":"#17161B","theme_color":"#17161B","icons":[{"src":"icon-192.png","sizes":"192x192","type":"image/png"},{"src":"icon-512.png","sizes":"512x512","type":"image/png"},{"src":"icon-512.png","sizes":"512x512","type":"image/png","purpose":"maskable"}]}