You've already forked crontab-ui
mirror of
https://github.com/alseambusher/crontab-ui.git
synced 2025-12-15 11:43:58 +08:00
Making url paths relative to enable reverse proxy
This commit is contained in:
5
app.js
5
app.js
@@ -30,6 +30,7 @@ if (BASIC_AUTH_USER && BASIC_AUTH_PWD) {
|
||||
|
||||
// include the routes
|
||||
var routes = require("./routes").routes;
|
||||
var routes_relative = require("./routes").relative
|
||||
|
||||
// set the view engine to ejs
|
||||
app.set('view engine', 'ejs');
|
||||
@@ -61,7 +62,7 @@ app.get(routes.root, function(req, res) {
|
||||
// send all the required parameters
|
||||
crontab.crontabs( function(docs){
|
||||
res.render('index', {
|
||||
routes : JSON.stringify(routes),
|
||||
routes : JSON.stringify(routes_relative),
|
||||
crontabs : JSON.stringify(docs),
|
||||
backups : crontab.get_backup_names(),
|
||||
env : crontab.get_env(),
|
||||
@@ -130,7 +131,7 @@ app.get(routes.restore, function(req, res) {
|
||||
// get all the crontabs
|
||||
restore.crontabs(req.query.db, function(docs){
|
||||
res.render('restore', {
|
||||
routes : JSON.stringify(routes),
|
||||
routes : JSON.stringify(routes_relative),
|
||||
crontabs : JSON.stringify(docs),
|
||||
backups : crontab.get_backup_names(),
|
||||
db: req.query.db
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "crontab-ui",
|
||||
"version": "0.3.9",
|
||||
"version": "0.3.10",
|
||||
"description": "Easy and safe way to manage your crontab file",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user