fix #4319 【メール】Cache-Controlヘッダ (no-cache no-store must-revalidate)が出力されない件を修正#4327
Merged
ryuring merged 2 commits intobaserproject:5.2.xfrom Mar 15, 2026
Merged
fix #4319 【メール】Cache-Controlヘッダ (no-cache no-store must-revalidate)が出力されない件を修正#4327ryuring merged 2 commits intobaserproject:5.2.xfrom
ryuring merged 2 commits intobaserproject:5.2.xfrom
Conversation
…evalidate)が出力されない件を修正
Contributor
There was a problem hiding this comment.
Pull request overview
お問い合わせ(bc-mail)のメールフォーム画面で Cache-Control: no-cache, no-store, must-revalidate 等が出力されない問題(#4319)を解消するため、レスポンスヘッダー付与処理を追加し、Docker 環境側の PHP セッションキャッシュ設定も調整するPRです。
Changes:
MailController::beforeRender()でメールフォーム画面の no-cache 系ヘッダーをレスポンスに付与- Docker の PHP 設定として
session.cache_limiter = noneを追加し、compose から読み込むように変更 - (別目的に見える)Docker の MySQL 文字コード/照合順序を utf8 → utf8mb4 に変更
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| plugins/bc-mail/src/Controller/MailController.php | メールフォーム画面のキャッシュ抑止ヘッダーをレスポンスへ設定 |
| docker/php/php.ini | Docker 環境での PHP セッションキャッシュリミッタ設定を調整 |
| docker/docker-compose.yml.default | PHP のカスタム ini をマウント、MySQL の文字コード設定を変更 |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+119
to
+125
| // キャッシュ対策: メールフォーム画面でCache-Controlヘッダーを出力 | ||
| if (!BcUtil::isConsole() && !$this->request->getParam('requested')) { | ||
| $this->response = $this->response | ||
| ->withHeader('Cache-Control', 'no-cache, no-store, must-revalidate') | ||
| ->withHeader('Pragma', 'no-cache') | ||
| ->withHeader('Expires', date(DATE_RFC1123, strtotime('-1 day'))); | ||
| } |
Comment on lines
+121
to
+124
| $this->response = $this->response | ||
| ->withHeader('Cache-Control', 'no-cache, no-store, must-revalidate') | ||
| ->withHeader('Pragma', 'no-cache') | ||
| ->withHeader('Expires', date(DATE_RFC1123, strtotime('-1 day'))); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
|
@kaburk ありがとうございます、マージしますね |
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.
よろしくお願いします。
docker環境だとphp.iniでnocacheが強制されていたので設定の調整も入れています。