mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
changed ordering on static assets path, just tidying.
This commit is contained in:
parent
c21549220c
commit
715ffcfbf2
1 changed files with 12 additions and 9 deletions
|
@ -10,6 +10,10 @@ Modules = require "./Modules"
|
||||||
|
|
||||||
fingerprints = {}
|
fingerprints = {}
|
||||||
Path = require 'path'
|
Path = require 'path'
|
||||||
|
|
||||||
|
|
||||||
|
imgPath = "/img/"
|
||||||
|
cssPath = "/stylesheets/"
|
||||||
jsPath =
|
jsPath =
|
||||||
if Settings.useMinifiedJs
|
if Settings.useMinifiedJs
|
||||||
"/minjs/"
|
"/minjs/"
|
||||||
|
@ -17,14 +21,6 @@ jsPath =
|
||||||
"/js/"
|
"/js/"
|
||||||
|
|
||||||
|
|
||||||
imgPath = "/img/"
|
|
||||||
cssPath = "/stylesheets/"
|
|
||||||
|
|
||||||
if Settings.cdn?.web?.host?
|
|
||||||
jsPath = "#{Settings.cdn?.web?.host}#{jsPath}"
|
|
||||||
imgPath = "#{Settings.cdn?.web?.host}#{imgPath}"
|
|
||||||
cssPath = "#{Settings.cdn?.web?.host}#{cssPath}"
|
|
||||||
|
|
||||||
logger.log "Generating file fingerprints..."
|
logger.log "Generating file fingerprints..."
|
||||||
for path in [
|
for path in [
|
||||||
"#{jsPath}libs/require.js",
|
"#{jsPath}libs/require.js",
|
||||||
|
@ -46,7 +42,14 @@ for path in [
|
||||||
fingerprints[path] = hash
|
fingerprints[path] = hash
|
||||||
else
|
else
|
||||||
logger.log filePath:filePath, "file does not exist for fingerprints"
|
logger.log filePath:filePath, "file does not exist for fingerprints"
|
||||||
|
|
||||||
|
logger.log "Finished generating file fingerprints"
|
||||||
|
|
||||||
|
if Settings.cdn?.web?.host?
|
||||||
|
jsPath = "#{Settings.cdn?.web?.host}#{jsPath}"
|
||||||
|
imgPath = "#{Settings.cdn?.web?.host}#{imgPath}"
|
||||||
|
cssPath = "#{Settings.cdn?.web?.host}#{cssPath}"
|
||||||
|
|
||||||
|
|
||||||
module.exports = (app, webRouter, apiRouter)->
|
module.exports = (app, webRouter, apiRouter)->
|
||||||
webRouter.use (req, res, next)->
|
webRouter.use (req, res, next)->
|
||||||
|
|
Loading…
Reference in a new issue