forked from sam/fedifeed
log referer and URI encode redirects
This commit is contained in:
parent
111c73396c
commit
270391a6e8
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -11,7 +11,7 @@ var morgan = require('morgan');
|
|||
|
||||
var app = Express();
|
||||
|
||||
var logger = morgan('tiny')
|
||||
var logger = morgan(':method :url :status via :referrer - :response-time ms')
|
||||
|
||||
app.use(
|
||||
serveStatic('static',{
|
||||
|
@ -41,7 +41,7 @@ app.get('/api/feed',cors(),function(req,res){
|
|||
var userUrl = feedUrl.replace(/\.atom$/i,'');
|
||||
|
||||
var redirectUrl = '/apiv2/feed?';
|
||||
var qs = ['userurl='+userUrl];
|
||||
var qs = ['userurl='+encodeURIComponent(userUrl),"api=v1"];
|
||||
|
||||
(['size','theme','boosts','replies']).forEach(key=>{
|
||||
if (typeof req.query[key] != 'undefined'){
|
||||
|
|
Loading…
Reference in a new issue