aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/components/services/Ping.vue8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue
index 9f4a03d..571c5ad 100644
--- a/src/components/services/Ping.vue
+++ b/src/components/services/Ping.vue
@@ -29,7 +29,13 @@ export default {
29 }, 29 },
30 methods: { 30 methods: {
31 fetchStatus: async function () { 31 fetchStatus: async function () {
32 const method = typeof this.item.method === 'string' && this.item.method.toLowerCase() === "get" ? "GET" : "HEAD" 32 const method = typeof this.item.method === 'string' ? this.item.method.toUpperCase() : 'unknown';
33
34 if (!['GET', 'HEAD', 'OPTION'].includes(method)) {
35 console.error(`Ping: ${method} is not a supported HTTP method`);
36 return;
37 }
38
33 this.fetch("/", { method, cache: "no-cache" }, false) 39 this.fetch("/", { method, cache: "no-cache" }, false)
34 .then(() => { 40 .then(() => {
35 this.status = "online"; 41 this.status = "online";