Fix for Safari Caching External View application 302 redirect links. See https://trello.com/c/optldnPm

This commit is contained in:
Daniel Blankenberg
2014-06-03 17:03:17 -04:00
parent 3965200d69
commit 285d807afc
@@ -738,6 +738,8 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use
return rval
elif app_action == None:
#redirect user to url generated by display link
#Fix for Safari caching display links, which can change if the underlying dataset has an attribute change, e.g. name, metadata, etc
trans.response.headers[ 'Cache-Control' ] = [ 'no-cache', 'max-age=0', 'no-store', 'must-revalidate' ]
return trans.response.send_redirect( display_link.display_url() )
else:
msg.append( ( 'Invalid action provided: %s' % app_action, 'error' ) )