Fixed #2596. Stopped bless-brunch from using its cacheBuster feature. Set no-cache header for /db/model.type/slug so that we can use Cloudflare on /db/model.type/object-id. Fixed a coffeelint warning.

This commit is contained in:
Nick Winter 2015-04-07 19:03:35 -07:00
parent f3c973b945
commit f02a8b54f3
4 changed files with 5 additions and 2 deletions

View file

@ -14,4 +14,4 @@
#poll-view
min-height: 200px
position: relative
z-index: 0

View file

@ -62,7 +62,7 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
for subscriber in @subscribers
subscriber.level = User.levelFromExp subscriber.user.points
if hero = subscriber.user.heroConfig?.thangType
subscriber.hero = slug for slug, original of ThangType.heroes when original is hero
subscriber.hero = _.invert(ThangType.heroes)[hero]
@render?()
@supermodel.addRequestResource('get_subscribers', options, 0).load()

View file

@ -199,6 +199,8 @@ exports.config =
sass:
mode: 'ruby'
allowCache: true
bless:
cacheBuster: false
modules:
definition: (path, data) ->

View file

@ -213,6 +213,7 @@ module.exports = class Handler
return @sendDatabaseError(res, err) if err
return @sendNotFoundError(res) unless document?
return @sendForbiddenError(res) unless @hasAccessToDocument(req, document)
res.setHeader 'Cache-Control', 'no-cache' unless Handler.isID(id + '') # Don't cache if it's a slug instead of an ID
@sendSuccess(res, @formatEntity(req, document))
getByRelationship: (req, res, args...) ->