Skip to content

Commit

Permalink
Merge pull request #46 from 2gis/fix/js-content-type
Browse files Browse the repository at this point in the history
Отдавать правильный content-type
  • Loading branch information
ilfa committed Sep 23, 2014
2 parents 4a015e2 + a7088bf commit fd57cf0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8,739 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getParams(req, resp, next) {
req.query.isDebug = (req.query.mode === 'debug');
req.query.sprite = (req.query.sprite === 'true');
req.query.mobile = (req.query.mobile === 'true');
var contentType = (req.path === '/js') ? 'application/x-javascript; charset=utf-8' : 'text/css';
var contentType = (req.path === '/js/') ? 'application/javascript; charset=utf-8' : 'text/css';

req.dgCallback = function (stream, response) {
response.set('Cache-Control', 'public, max-age=604800');
Expand Down
Loading

0 comments on commit fd57cf0

Please sign in to comment.