mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-02-05 21:09:56 +01:00
Fix ConnectivityChecker to evaluate the response status codes.
This commit is contained in:
parent
3786f80dae
commit
a5fe53beb2
@ -37,8 +37,12 @@ export default {
|
|||||||
method: "HEAD",
|
method: "HEAD",
|
||||||
cache: "no-store",
|
cache: "no-store",
|
||||||
})
|
})
|
||||||
.then(function () {
|
.then(function (response) {
|
||||||
that.offline = false;
|
if (response.status >= 200 && response.status < 300) {
|
||||||
|
that.offline = false;
|
||||||
|
} else {
|
||||||
|
that.offline = true;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function () {
|
||||||
that.offline = true;
|
that.offline = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user