Merge branch 'master' into staging
This commit is contained in:
commit
0866376af6
10
app.yaml
10
app.yaml
|
@ -3,8 +3,12 @@ env: flex
|
|||
|
||||
resources:
|
||||
cpu: 1
|
||||
memory_gb: 0.5
|
||||
memory_gb: 1
|
||||
disk_size_gb: 10
|
||||
|
||||
health_check:
|
||||
enable_health_check: False
|
||||
liveness_check:
|
||||
path: "/"
|
||||
check_interval_sec: 30
|
||||
timeout_sec: 4
|
||||
failure_threshold: 2
|
||||
success_threshold: 2
|
||||
|
|
|
@ -94,9 +94,7 @@ function searchEntries(tarballStream, entryName, wantsIndex) {
|
|||
|
||||
const chunks = [];
|
||||
|
||||
stream
|
||||
.on('data', chunk => chunks.push(chunk))
|
||||
.on('end', () => {
|
||||
stream.on('data', chunk => chunks.push(chunk)).on('end', () => {
|
||||
const content = Buffer.concat(chunks);
|
||||
|
||||
// Set some extra properties for files that we will
|
||||
|
@ -139,6 +137,10 @@ export default function findFile(req, res, next) {
|
|||
if (!foundEntry) {
|
||||
return res
|
||||
.status(404)
|
||||
.set({
|
||||
'Cache-Control': 'public, max-age=31536000', // 1 year
|
||||
'Cache-Tag': 'missing, missing-entry'
|
||||
})
|
||||
.type('text')
|
||||
.send(`Cannot find "${req.filename}" in ${req.packageSpec}`);
|
||||
}
|
||||
|
@ -158,6 +160,10 @@ export default function findFile(req, res, next) {
|
|||
} else {
|
||||
return res
|
||||
.status(404)
|
||||
.set({
|
||||
'Cache-Control': 'public, max-age=31536000', // 1 year
|
||||
'Cache-Tag': 'missing, missing-index'
|
||||
})
|
||||
.type('text')
|
||||
.send(
|
||||
`Cannot find an index in "${req.filename}" in ${
|
||||
|
|
Loading…
Reference in New Issue