- Rate limit login (5 attempts/min per IP) with a JSON 429 response - Constant-time password comparison; refuse login if no password is configured - Explicit SameSite=Strict auth cookie; log failed logins with client IP - Stop logging door codes (update log lines and the SMS body) - Replace per-action try/catch -> 400 with a global exception handler (JSON 500) - Return proper statuses: 404 for missing person, 502 for failed lock writes - Validate codes as ASCII digits only (int.TryParse accepted +/-/whitespace) - Validate person name and E.164 phone number; reject sending an unset code - Rename TwiloOptions -> TwilioOptions and fix message typos - Expose Program for integration tests
26 lines
616 B
Vue
26 lines
616 B
Vue
<script setup lang="ts">
|
|
import { onMounted, ref } from 'vue';
|
|
|
|
const runtimeConfig = useRuntimeConfig();
|
|
const healthResult = ref<string>("Fetching health check...");
|
|
|
|
onMounted(async () => {
|
|
// Send a request to the API Health Check endpoint
|
|
const response = await fetch(`${runtimeConfig.public.apiBaseUrl}/api/Health`);
|
|
|
|
// Extract the response payload (string result)
|
|
const result = await response.text();
|
|
|
|
// Set the result
|
|
healthResult.value = result;
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div class="text-slate-300">
|
|
<h1>Health Check</h1>
|
|
<p>{{ healthResult }}</p>
|
|
</div>
|
|
</template> |