From 2a0735ed52911d972958c6d5c4528c2073d54b06 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Thu, 7 May 2026 23:37:17 +0900 Subject: Add Referrer-Policy no-referrer header --- Caddyfile | 1 + Deploy.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Caddyfile b/Caddyfile index 8db7f4d..3c68ab4 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,3 +1,4 @@ golive.yyamashita.com { + header Referrer-Policy "no-referrer" reverse_proxy app:3000 } diff --git a/Deploy.md b/Deploy.md index 4b02e06..11921f3 100644 --- a/Deploy.md +++ b/Deploy.md @@ -41,8 +41,8 @@ ssh golive 'docker compose -f /app/docker-compose.yml ps' # 手動再起動 ssh golive 'cd /app && docker compose restart' -# スクレイピング手動実行 -ssh golive 'curl -s -X POST http://localhost:3000/api/scrape' +# スクレイピング手動実行(コンテナ内 Node で fetch) +ssh golive 'docker exec app-app-1 node -e "fetch(\"http://localhost:3000/api/scrape\").then(r=>r.text()).then(console.log)"' ``` ## スクレイピング定期実行(cron) @@ -50,7 +50,7 @@ ssh golive 'curl -s -X POST http://localhost:3000/api/scrape' ```bash ssh golive 'crontab -e' # 以下を追加(毎朝5時): -# 0 5 * * * curl -s -X POST http://localhost:3000/api/scrape +# 0 5 * * * docker exec app-app-1 node -e "fetch('http://localhost:3000/api/scrape').then(r=>r.text()).then(console.log)" ``` ## 初回サーバーセットアップ手順(再構築時) -- cgit v1.2.3