Showing
2 changed files
with
8 additions
and
1 deletions
| ... | ... | @@ -12,6 +12,7 @@ module Kanjai |
| 12 | 12 | |
| 13 | 13 | before_action :authenticate_admin_user! |
| 14 | 14 | before_action :set_locale |
| 15 | + before_action :set_cache_headers | |
| 15 | 16 | |
| 16 | 17 | after_action :prepare_unobtrusive_flash |
| 17 | 18 | |
| ... | ... | @@ -21,5 +22,11 @@ module Kanjai |
| 21 | 22 | I18n.locale = :en |
| 22 | 23 | end |
| 23 | 24 | |
| 25 | + def set_cache_headers | |
| 26 | + response.headers["Cache-Control"] = "no-cache, no-store" | |
| 27 | + response.headers["Pragma"] = "no-cache" | |
| 28 | + response.headers["Expires"] = "Mon, 01 Jan 1990 00:00:00 GMT" | |
| 29 | + end | |
| 30 | + | |
| 24 | 31 | end |
| 25 | 32 | end |
| \ No newline at end of file | ... | ... |