mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Add some max-age to device and browser icons so that they can be served directly from cache.
This commit is contained in:
parent
d51da4b215
commit
c5d79c7b80
2 changed files with 14 additions and 6 deletions
|
@ -1,8 +1,12 @@
|
|||
var express = require('express')
|
||||
var serveStatic = require('serve-static')
|
||||
|
||||
var pathutil = require('../../../util/pathutil')
|
||||
|
||||
module.exports = function() {
|
||||
return express.static(
|
||||
pathutil.root('node_modules/stf-browser-db/dist'))
|
||||
return serveStatic(
|
||||
pathutil.root('node_modules/stf-browser-db/dist')
|
||||
, {
|
||||
maxAge: '30d'
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
var express = require('express')
|
||||
var serveStatic = require('serve-static')
|
||||
|
||||
var pathutil = require('../../../util/pathutil')
|
||||
|
||||
module.exports = function() {
|
||||
return express.static(
|
||||
pathutil.root('node_modules/stf-device-db/dist'))
|
||||
return serveStatic(
|
||||
pathutil.root('node_modules/stf-device-db/dist')
|
||||
, {
|
||||
maxAge: '30d'
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue