mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
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:
parent
f3c973b945
commit
f02a8b54f3
4 changed files with 5 additions and 2 deletions
|
@ -14,4 +14,4 @@
|
||||||
#poll-view
|
#poll-view
|
||||||
min-height: 200px
|
min-height: 200px
|
||||||
position: relative
|
position: relative
|
||||||
|
z-index: 0
|
||||||
|
|
|
@ -62,7 +62,7 @@ module.exports = class AnalyticsSubscriptionsView extends RootView
|
||||||
for subscriber in @subscribers
|
for subscriber in @subscribers
|
||||||
subscriber.level = User.levelFromExp subscriber.user.points
|
subscriber.level = User.levelFromExp subscriber.user.points
|
||||||
if hero = subscriber.user.heroConfig?.thangType
|
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?()
|
@render?()
|
||||||
@supermodel.addRequestResource('get_subscribers', options, 0).load()
|
@supermodel.addRequestResource('get_subscribers', options, 0).load()
|
||||||
|
|
||||||
|
|
|
@ -199,6 +199,8 @@ exports.config =
|
||||||
sass:
|
sass:
|
||||||
mode: 'ruby'
|
mode: 'ruby'
|
||||||
allowCache: true
|
allowCache: true
|
||||||
|
bless:
|
||||||
|
cacheBuster: false
|
||||||
|
|
||||||
modules:
|
modules:
|
||||||
definition: (path, data) ->
|
definition: (path, data) ->
|
||||||
|
|
|
@ -213,6 +213,7 @@ module.exports = class Handler
|
||||||
return @sendDatabaseError(res, err) if err
|
return @sendDatabaseError(res, err) if err
|
||||||
return @sendNotFoundError(res) unless document?
|
return @sendNotFoundError(res) unless document?
|
||||||
return @sendForbiddenError(res) unless @hasAccessToDocument(req, 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))
|
@sendSuccess(res, @formatEntity(req, document))
|
||||||
|
|
||||||
getByRelationship: (req, res, args...) ->
|
getByRelationship: (req, res, args...) ->
|
||||||
|
|
Loading…
Reference in a new issue