Skip to content

Commit f628f13

Browse files
committed
nginx: throttle 302 redirects for retries
1 parent a8c996e commit f628f13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ephemeral-npm.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function _M.getPackage()
3030
-- somehow the metadata isn't valid JSON.. let's tell
3131
-- the client to try again and hope it works out better
3232
-- next time
33+
ngx.sleep(2)
3334
return ngx.redirect(uri, ngx.HTTP_MOVED_TEMPORARILY)
3435
end
3536
meta:set(uri, body, _M.MAXAGE)

0 commit comments

Comments
 (0)