Skip to content

ドライブのファイルにアクセスできなかった時、エラーのキャッシュがimmutableになる #17276

@FineArchs

Description

@FineArchs

💡 Summary

https://<ドメイン>/files/<ファイルID>
https://<ドメイン>/proxy/<省略>にアクセス時、
バックエンド側で何らかの要因で目的のファイルが見当たらなかった・アクセスできなかった時、フロントエンドに返ってくるエラーメッセージのヘッダにCache-Control: max-age=31536000, immutableが付与されます。
結果、バックエンド側でファイルへのアクセスが回復してもCDNのキャッシュなどでフロントエンド側に反映されない場合があります。

🥰 Expected Behavior

Cache-Controlが通常のエラー同様max-age=300

🤬 Actual Behavior

max-age=31536000, immutable

📝 Steps to Reproduce

(オブジェクトストレージを使用しない場合)

  1. ドライブにファイルをアップロードする
  2. ローカルで/files下にある該当ファイルの名前を変える
  3. curl -IやdevtoolsなどでファイルのURL(https://<ドメイン>/files/<ファイルID>https://<ドメイン>/proxy/<省略>)にアクセスし、Cache-Controlを確認

💻 Frontend Environment

* Model and OS of the device(s): Windows, Androidなど
* Browser: Chrome, Edgeなど
* Server URL: voskey.icalo.net
* Misskey: 2026.3.1

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions