Skip to content
Snippets Groups Projects
Commit c296c4a1 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: cache requests for npm, github only

parent 9617072f
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,9 @@ export default create({ ...@@ -15,6 +15,9 @@ export default create({
if (options.stream) { if (options.stream) {
return next(options); return next(options);
} }
if (!['github', 'npm'].includes(options.hostType)) {
return next(options);
}
if (options.method === 'GET') { if (options.method === 'GET') {
const cacheKey = crypto const cacheKey = crypto
.createHash('md5') .createHash('md5')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment