Repository navigation
Plausible 통계수집 Worker 를 동일 도메인 Worker로 변경 - 중국통계 누락 방지를 위한 보완. - #182
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
Plausible 스크립트와 이벤트 전송이
round-breeze-3e9d.jay-e45.workers.dev(Cloudflare*.workers.dev) 도메인을 직접 호출하고 있었습니다.*.workers.dev는 중국 본토에서 접속이 차단되는 것으로 알려져 있어, 중국 방문자는 스크립트 로드 자체가 실패해 통계가 누락됩니다.같은 Worker 를 rcloneview.com 의 경로(
/workshop,/calendar)로 이미 연결해 두었으므로, 이를 사용하도록 바꿉니다.변경 사항
docusaurus.config.js의 Plausiblescripts항목만 변경했습니다 (3줄).srchttps://round-breeze-3e9d.jay-e45.workers.dev/workshop/script...js?v=20250331/workshop/script...js?v=20250331data-apihttps://round-breeze-3e9d.jay-e45.workers.dev/calendar/event/calendar/eventdefer,data-domain="rcloneview.com"은 그대로라 집계 대상 사이트는 바뀌지 않습니다.동작 방식
scripts속성을 그대로 출력하고 baseUrl(/support)을 붙이지 않습니다 (@docusaurus/core/lib/server/plugins/synthetic.js)./로 시작하는 경로라 페이지 깊이와 관계없이 항상https://rcloneview.com/workshop/...,https://rcloneview.com/calendar/event로 요청됩니다.www.rcloneview.com/support,http://rcloneview.com/support는 모두https://rcloneview.com/support로 301 되므로 다른 호스트로 서비스되는 경우는 없습니다.사전 확인 (운영)
https://rcloneview.com/workshop/...js→ 200. 기존 workers.dev 주소의 스크립트와 내용이 같습니다 (해시 일치).https://rcloneview.com/calendar/eventPOST → 202ok. 기존 주소와 같은 응답입니다.로컬 빌드 확인 (9개 로케일)
npm run build성공src/data-api포함, 구 workers.dev 주소 0개,/support가 붙은 경로 0개참고 / 배포 후 확인
*.pages.dev프리뷰에는/workshop,/calendar경로가 없어 통계가 전송되지 않습니다. 정상이며, 테스트 방문이 운영 통계에 섞이지 않습니다.script...js200,event202 인지