updated logging on serves
This commit is contained in:
parent
c34d8a2cc5
commit
013069b686
1 changed files with 2 additions and 6 deletions
|
@ -33,6 +33,7 @@ function serveFile ({ fileName, fileType, filePath }, res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendAnalyticsAndLog (headers, ip, originalUrl) {
|
function sendAnalyticsAndLog (headers, ip, originalUrl) {
|
||||||
|
logger.verbose('headers', headers);
|
||||||
// google analytics
|
// google analytics
|
||||||
sendGoogleAnalytics('serve', headers, ip, originalUrl);
|
sendGoogleAnalytics('serve', headers, ip, originalUrl);
|
||||||
// logging
|
// logging
|
||||||
|
@ -41,12 +42,7 @@ function sendAnalyticsAndLog (headers, ip, originalUrl) {
|
||||||
|
|
||||||
module.exports = (app) => {
|
module.exports = (app) => {
|
||||||
// route to fetch one free public claim
|
// route to fetch one free public claim
|
||||||
app.get('/:name/:claim_id', ({ headers, ip, ips, originalUrl, params }, res) => {
|
app.get('/:name/:claim_id', ({ headers, ip, originalUrl, params }, res) => {
|
||||||
logger.verbose('ip', ip);
|
|
||||||
logger.verbose('ips', ips);
|
|
||||||
logger.verbose('headers', headers);
|
|
||||||
logger.verbose('user-agent', headers['user-agent']);
|
|
||||||
logger.verbose('accept-language', headers['accept-language']);
|
|
||||||
sendAnalyticsAndLog(headers, ip, originalUrl);
|
sendAnalyticsAndLog(headers, ip, originalUrl);
|
||||||
// begin image-serve processes
|
// begin image-serve processes
|
||||||
serveController
|
serveController
|
||||||
|
|
Loading…
Reference in a new issue