We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04f1bee commit 53c1faeCopy full SHA for 53c1fae
dockerLaTeX/LaTeXApi.py
@@ -7,20 +7,12 @@
7
8
@app.route('/latexApi', methods=['POST'])
9
def index():
10
- allowedCommands = set(['docbook2html','docbook2rtf','dblatex','pandoc'])
11
try:
12
dockBookCmd = request.values.get('docBookCmd')
13
- if not docBookCmd:
14
- print("No DocBook command")
15
- abort(400)
16
- cmd = docBookCmd.split(' ')[0]
17
- if (docBookCmd.split(' ')[0] not in allowedCommands):
18
- print(cmd + " is not allowed.")
19
20
os.system(dockBookCmd)
21
return "Success"
22
except Exception:
23
abort(500)
24
25
if __name__ == '__main__':
26
- app.run(host="0.0.0.0",debug=True)
+ app.run(host="0.0.0.0")
0 commit comments