Skip to content

fix #4319 【メール】Cache-Controlヘッダ (no-cache no-store must-revalidate)が出力されない件を修正#4327

Merged
ryuring merged 2 commits intobaserproject:5.2.xfrom
kaburk:5.2.x-#4319
Mar 15, 2026
Merged

fix #4319 【メール】Cache-Controlヘッダ (no-cache no-store must-revalidate)が出力されない件を修正#4327
ryuring merged 2 commits intobaserproject:5.2.xfrom
kaburk:5.2.x-#4319

Conversation

@kaburk
Copy link
Collaborator

@kaburk kaburk commented Mar 13, 2026

よろしくお願いします。

docker環境だとphp.iniでnocacheが強制されていたので設定の調整も入れています。

Copilot AI review requested due to automatic review settings March 13, 2026 12:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@ryuring
Copy link
Collaborator

ryuring commented Mar 15, 2026

@kaburk ありがとうございます、マージしますね

@ryuring ryuring merged commit d28bf49 into baserproject:5.2.x Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants