mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Merge pull request #158 from AikidoSec/prevent-packagemanager-from-caching-modified-response
Prevent package manager from caching modified response
This commit is contained in:
commit
fb3a8582a2
1 changed files with 3 additions and 0 deletions
|
|
@ -87,6 +87,9 @@ export function modifyNpmInfoResponse(body, headers) {
|
||||||
// no longer match the content so they needs to be removed before sending the response.
|
// no longer match the content so they needs to be removed before sending the response.
|
||||||
delete headers["etag"];
|
delete headers["etag"];
|
||||||
delete headers["last-modified"];
|
delete headers["last-modified"];
|
||||||
|
// Removing the cache-control header will prevent the package manager from caching
|
||||||
|
// the modified response.
|
||||||
|
delete headers["cache-control"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue