Skip to content
Snippets Groups Projects
Commit 5a0a6fbe authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

prevent status image to be cached

parent 11b662d7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,6 +4,7 @@ class ProjectsController < ApplicationController
before_filter :authenticate_user!, except: [:build, :status, :index, :show]
before_filter :project, only: [:build, :details, :show, :status, :edit, :update, :destroy, :stats]
before_filter :authenticate_token!, only: [:build]
before_filter :no_cache, only: [:status]
 
def index
@projects = Project.order('id DESC')
Loading
Loading
@@ -114,4 +115,10 @@ class ProjectsController < ApplicationController
def project
@project ||= Project.find(params[:id])
end
def no_cache
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment