feat(ini): LOGOUT_URI を NENE_LOGOUT_URI で env override 可能にする (#277)#284
Merged
Conversation
This was referenced May 21, 2026
ini/xSystemIni.php の const LOGOUT_URI は hard-coded '/' で、protected
HTML page を unauth で叩いた時の redirect 先を変更できなかった。
カスタム login page (/auth/login 等) を持つアプリで、unauth visitor が
index splash に飛ばされて何のシグナルも出ない UX になっていた
(FT5 で実走確認、ini 直書き換えで workaround していた)。
他の NENE_* env var (NENE_PORT, NENE_DB_TYPE 等) と同じ pattern で
env override:
const LOGOUT_URI = (getenv('NENE_LOGOUT_URI') !== false)
? (string)getenv('NENE_LOGOUT_URI') : '/';
compose.yaml の app environment に NENE_LOGOUT_URI 行追加、
docs/development/docker.md の Environment Variables section に
使用例を追記。default '/' は維持なので既存 deployment は無変更。
Closes #277.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4d7a44b to
a4e7de7
Compare
直前のコミット (#284 初版) で const LOGOUT_URI = (getenv(...) !== false) ? ... : '/'; と書いたが、PHP の const 宣言は constant expression に限定され getenv() 呼び出しは許されないため PHP Fatal error: Constant expression contains invalid operations in ini/xSystemIni.php on line 125 で全リクエストが 500 になる致命バグだった (CI で発覚)。 xSystemIni.php の DB_* / SESSION_* と同じ define() + \$getEnv() helper パターンに揃えて修正。挙動は仕様通り (default '/'、 NENE_LOGOUT_URI で上書き可能)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Test plan
🤖 Generated with Claude Code