pluviouse commited on
Commit
d3efcd3
·
verified ·
1 Parent(s): 8b7eff4

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +1 -1
app.js CHANGED
@@ -10,7 +10,7 @@ app.use(morgan('combined'));
10
 
11
  // Route to count hits
12
  app.get('/', (req, res) => {
13
- const userAgent = req.headers.get('user-agent');
14
 
15
  // Increment hit only if not from fetch
16
  if (!userAgent || userAgent.toLowerCase().includes('fetch')) {
 
10
 
11
  // Route to count hits
12
  app.get('/', (req, res) => {
13
+ const userAgent = req.headers['user-agent'];
14
 
15
  // Increment hit only if not from fetch
16
  if (!userAgent || userAgent.toLowerCase().includes('fetch')) {