LoginSignup
1
0

More than 5 years have passed since last update.

ASP.NET CoreのResponseCacheAttributeはformタグが入っていると機能しない

Posted at

3時間くらい延々とハマったのでメモ

ResponseCacheAttributeを設定すると、その設定通りのレスポンスヘッダが設定されるが、出力するhtmlの中(Razorの中)にformタグがあるとCSRF対策が機能するため(要出典)、no-store no-cacheなレスポンスヘッダとなる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0