mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-08-04 13:43:04 +00:00
Merge pull request #186 from pdevq/connectivity_checker_status
Fix ConnectivityChecker to evaluate the response status codes
This commit is contained in:
commit
a6b7db5437
1 changed files with 6 additions and 2 deletions
|
|
@ -37,8 +37,12 @@ export default {
|
|||
method: "HEAD",
|
||||
cache: "no-store",
|
||||
})
|
||||
.then(function () {
|
||||
that.offline = false;
|
||||
.then(function (response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
that.offline = false;
|
||||
} else {
|
||||
that.offline = true;
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
that.offline = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue