feat(sentry): Implement Sentry Tunnel to avoid local network permission dialog

- Add /api/sentry-tunnel API Route (Next.js)
- Update sentry.client.config.ts with tunnel option
- Re-enable NEXT_PUBLIC_SENTRY_DSN in CI/CD workflows

Resolves: #45 Sentry Tunnel
See: feedback_sentry_local_network.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-24 16:16:34 +08:00
parent cd7d63eeb1
commit b20987e7b6
4 changed files with 94 additions and 6 deletions

View File

@@ -185,9 +185,7 @@ jobs:
run: |
docker build --push \
--build-arg NEXT_PUBLIC_API_URL=https://awoooi.wooo.work \
# 暫時停用前端 Sentry (會觸發區域網路權限對話框)
# TODO: 實作 Sentry Tunnel 後再啟用
# --build-arg NEXT_PUBLIC_SENTRY_DSN=http://da02d4e5d6542e4d1ed6b2dd6542efeb@192.168.0.110:9000/2 \
--build-arg NEXT_PUBLIC_SENTRY_DSN=http://da02d4e5d6542e4d1ed6b2dd6542efeb@192.168.0.110:9000/2 \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:${{ steps.tag.outputs.tag }} \
--file apps/web/Dockerfile .
echo "✅ Web: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-web:${{ steps.tag.outputs.tag }}"

View File

@@ -148,9 +148,8 @@ jobs:
- name: Build packages
env:
NEXT_PUBLIC_API_URL: https://awoooi.wooo.work
# 暫時停用前端 Sentry (會觸發區域網路權限對話框)
# TODO: 實作 Sentry Tunnel 後再啟用
# NEXT_PUBLIC_SENTRY_DSN: http://da02d4e5d6542e4d1ed6b2dd6542efeb@192.168.0.110:9000/2
# Sentry DSN (透過 /api/sentry-tunnel 避免區域網路權限問題)
NEXT_PUBLIC_SENTRY_DSN: http://da02d4e5d6542e4d1ed6b2dd6542efeb@192.168.0.110:9000/2
run: pnpm turbo build
- name: Upload build artifacts