summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.ja.md6
-rw-r--r--README.md7
2 files changed, 11 insertions, 2 deletions
diff --git a/README.ja.md b/README.ja.md
index cede5d4..e4be653 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -126,6 +126,10 @@ TARGET_URL=http://localhost:8081
# 本番環境では、openssl rand -base64 45 を使って新しいキーを生成してください
SESSION_SECRET=my-super-secret-key
+# (必須) CSRF保護のための32バイトのランダムなキー。
+# 生成コマンド: openssl rand -base64 32
+CSRF_SECRET_KEY=
+
# --- データベース ---
# 以下のいずれかのオプションを使用してください:
@@ -479,6 +483,6 @@ curl -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost:8080/api/config
| `AUTH_PATH_*` | ログイン、管理者ページなどの内部URLをカスタマイズするための変数セット。 | 様々、例: `/login`|
| `AUTH_ASSETS_PATH` | 内部静的アセット(CSS, JS)を提供するためのURLパス。 | `/assets` |
| `ENV` | ランタイム環境。セキュアなクッキーを有効にするには`production`に設定します。 | - |
-| `CSRF_SECRET_KEY` | **(必須)** CSRF保護のための長くてランダムな秘密鍵。 | - |
+| `CSRF_SECRET_KEY` | **(必須)** CSRF保護のための32バイトのランダムなキー。`openssl rand -base64 32` で生成します。 | - |
| `CSRF_TRUSTED_ORIGINS` | CSRF保護のための信頼できるオリジンのカンマ区切りリスト。 | - |
| `CSRF_SAME_SITE` | CSRFクッキーのSameSite属性。`lax`、`strict`、または`none`にすることができます。 | `lax` |
diff --git a/README.md b/README.md
index c00c26e..45850c9 100644
--- a/README.md
+++ b/README.md
@@ -120,10 +120,15 @@ LISTEN_PORT=8080
# --- Required ---
# The URL of the backend service you want to protect
TARGET_URL=http://localhost:8081
+
# A long, random string for securing session cookies and JWTs
# For production, generate a new key using: openssl rand -base64 45
SESSION_SECRET=my-super-secret-key
+# (Required) A 32-byte random key for CSRF protection.
+# Generate with: openssl rand -base64 32
+CSRF_SECRET_KEY=
+
# --- Database ---
# Use ONE of the following options:
@@ -477,6 +482,6 @@ The base path for these endpoints is `/api/admin/users`, which can be customized
| `AUTH_PATH_*` | A set of variables to customize the internal URLs for login, admin, etc. | Various, e.g., `/login`|
| `AUTH_ASSETS_PATH` | The URL path for serving internal static assets (CSS, JS). | `/assets` |
| `ENV` | The runtime environment. Set to `production` to enable secure cookies. | - |
-| `CSRF_SECRET_KEY` | **(Required)** A long, random secret key for CSRF protection. | - |
+| `CSRF_SECRET_KEY` | **(Required)** A 32-byte random key for CSRF protection. Generate with `openssl rand -base64 32`. | - |
| `CSRF_TRUSTED_ORIGINS` | A comma-separated list of trusted origins for CSRF protection. | - |
| `CSRF_SAME_SITE` | The SameSite attribute for the CSRF cookie. Can be `lax`, `strict`, or `none`. | `lax` | \ No newline at end of file