Merge branch 'master' of https://github.com/sharelatex/clsi-sharelatex
This commit is contained in:
10
app.coffee
10
app.coffee
@@ -4,6 +4,8 @@ logger = require "logger-sharelatex"
|
||||
logger.initialize("clsi")
|
||||
smokeTest = require "smoke-test-sharelatex"
|
||||
|
||||
Path = require "path"
|
||||
|
||||
Metrics = require "metrics-sharelatex"
|
||||
Metrics.initialize("clsi")
|
||||
Metrics.open_sockets.monitor(logger)
|
||||
@@ -33,7 +35,13 @@ app.delete "/project/:project_id", CompileController.clearCache
|
||||
app.get "/project/:project_id/sync/code", CompileController.syncFromCode
|
||||
app.get "/project/:project_id/sync/pdf", CompileController.syncFromPdf
|
||||
|
||||
staticServer = express.static(Settings.path.compilesDir)
|
||||
staticServer = express.static Settings.path.compilesDir, setHeaders: (res, path, stat) ->
|
||||
if Path.basename(path) == "output.pdf"
|
||||
res.set("Content-Type", "application/pdf")
|
||||
else
|
||||
# Force plain treatment of other file types to prevent hosting of HTTP/JS files
|
||||
# that could be used in same-origin/XSS attacks.
|
||||
res.set("Content-Type", "text/plain")
|
||||
app.get "/project/:project_id/output/*", (req, res, next) ->
|
||||
req.url = "/#{req.params.project_id}/#{req.params[0]}"
|
||||
staticServer(req, res, next)
|
||||
|
||||
Binary file not shown.
@@ -1,17 +0,0 @@
|
||||
Section Title
|
||||
-------------
|
||||
|
||||
* List item one
|
||||
* List item two
|
||||
|
||||
: Sample grid table.
|
||||
|
||||
+---------------+---------------+--------------------+
|
||||
| Fruit | Price | Advantages |
|
||||
+===============+===============+====================+
|
||||
| Bananas | $1.34 | - built-in wrapper |
|
||||
| | | - bright color |
|
||||
+---------------+---------------+--------------------+
|
||||
| Oranges | $2.10 | - cures scurvy |
|
||||
| | | - tasty |
|
||||
+---------------+---------------+--------------------+
|
||||
@@ -1,9 +0,0 @@
|
||||
\documentclass{article}
|
||||
\usepackage{longtable}
|
||||
\usepackage{booktabs, multicol, multirow}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\input{chapters/chapter1}
|
||||
|
||||
\end{document}
|
||||
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
% Title
|
||||
% Author
|
||||
% Date
|
||||
|
||||
Chapter title
|
||||
=============
|
||||
|
||||
Section Title
|
||||
-------------
|
||||
|
||||
Hello world. Have a nice table:
|
||||
|
||||
: Sample grid table.
|
||||
|
||||
+---------------+---------------+--------------------+
|
||||
| Fruit | Price | Advantages |
|
||||
+===============+===============+====================+
|
||||
| Bananas | $1.34 | - built-in wrapper |
|
||||
| | | - bright color |
|
||||
+---------------+---------------+--------------------+
|
||||
| Oranges | $2.10 | - cures scurvy |
|
||||
| | | - tasty |
|
||||
+---------------+---------------+--------------------+
|
||||
Binary file not shown.
Reference in New Issue
Block a user