mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging some more stuff in main log, and greasyfork redirection
This commit is contained in:
parent
3828e3111b
commit
5119280303
2 changed files with 16 additions and 2 deletions
16
server.js
16
server.js
|
@ -119,6 +119,7 @@ app.get('/sio', function(req, res) {
|
|||
app.get('/manual', function(req, res) {
|
||||
res.write(utils.ReadFile(manFile));
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/public', function(req, res) {
|
||||
|
@ -144,6 +145,8 @@ app.get('/legacy', function(req, res) {
|
|||
res.render('alldata', {
|
||||
data: d
|
||||
});
|
||||
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.post('/postfeedback', function(req, res) {
|
||||
|
@ -170,21 +173,31 @@ app.post('/isAdding', function(req, res) {
|
|||
app.get('/menuClick', function(req, res) {
|
||||
res.redirect("/");
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/irc', function(req, res) {
|
||||
res.redirect(ircURL);
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/greasy', function(req, res) {
|
||||
res.redirect("https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help");
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/scriptgit', function(req, res) {
|
||||
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/moodle-test-userscript");
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/servergit', function(req, res) {
|
||||
res.redirect("https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server");
|
||||
res.end();
|
||||
Log(req);
|
||||
});
|
||||
|
||||
function UploadFile(req, res, path, next) {
|
||||
|
@ -222,6 +235,7 @@ app.route('/badtestsender').post(function(req, res, next) {
|
|||
UploadFile(req, res, recivedFiles, (fn) => {
|
||||
res.render("uploaded");
|
||||
});
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('*', function(req, res) {
|
||||
|
@ -256,7 +270,7 @@ function Log(req, toFile, sc) {
|
|||
var ip = req.headers['cf-connecting-ip'] || req.connection.remoteAddress;
|
||||
var logEntry = "[RSND]: " + ip + ", " + req.headers['user-agent'] +
|
||||
" " + req.method + " ";
|
||||
if (sc == 404)
|
||||
if (sc != undefined && sc == 404)
|
||||
logEntry += sc + " ";
|
||||
logEntry += req.url;
|
||||
var color = logger.GetColor("green");
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
</p>
|
||||
<h2>
|
||||
<a href="https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help">Script
|
||||
<a href="<%= siteurl %>/greasy">Script
|
||||
greasyforkon</a> |
|
||||
<a href="<%= siteurl %>/irc">IRC</a> |
|
||||
<a href="<%= siteurl %>/manual">Manual</a> |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue