question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Header exposing npm module name and store used.

See original GitHub issue

The below lines in file apicache.js are exposing couple of critical information to the www.

  1. It is exposing that apicache is being used at server.
  2. If redis is used with it, It is exposing that redis is being used at server.

'apicache-store': globalOptions.redisClient ? 'redis' : 'memory', 'apicache-version': pkg.version

These headers should be removed. If not, atleast there should be a production check before assigning any additional module specific headers. Something like: `if (process.env.NODE_ENV !== “production”) {

}`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kwhitleycommented, Feb 15, 2019

Got it - will implement a test and (at least) leave headers off on NODE_ENV === 'production'

0reactions
satya-jugrancommented, Feb 17, 2019

Got it - will implement a test and (at least) leave headers off on NODE_ENV === 'production'

Awesome, Thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

package.json - npm Docs
json which is a map of command name to local file name. When this package is installed globally, that file will be either...
Read more >
Import from subfolder of npm package - Stack Overflow
I create subfolders with ES6 source code in the root of the project and publish those dirs to NPM, but I guess this...
Read more >
Requiring modules in Node.js: Everything you need to know
There is nothing special about require . It's an object that acts mainly as a function that takes a module name or path...
Read more >
Access-Control-Expose-Headers - HTTP - MDN Web Docs
The Access-Control-Expose-Headers response header allows a server to indicate which response headers should be made available to scripts ...
Read more >
How To Work with Files using the fs Module in Node.js
The name is short for “file system,” and the module contains all the functions you need to read, write, and delete files on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found