forked from root/acme.js
add timeout to maintainer request
This commit is contained in:
parent
d10482697b
commit
569c922eb0
|
@ -36,6 +36,7 @@ M._init = function(me, tz, locale) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// prevent a stampede from misconfigured clients in an eternal loop
|
// prevent a stampede from misconfigured clients in an eternal loop
|
||||||
me.request({
|
me.request({
|
||||||
|
timeout: 3000,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: 'https://api.rootprojects.org/api/nonce',
|
url: 'https://api.rootprojects.org/api/nonce',
|
||||||
json: true
|
json: true
|
||||||
|
@ -47,6 +48,7 @@ M._init = function(me, tz, locale) {
|
||||||
})
|
})
|
||||||
.then(function(hashcash) {
|
.then(function(hashcash) {
|
||||||
var req = {
|
var req = {
|
||||||
|
timeout: 3000,
|
||||||
headers: {
|
headers: {
|
||||||
'x-root-nonce-v1': hashcash
|
'x-root-nonce-v1': hashcash
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue