change 0.0.0.0 to localhost

This commit is contained in:
2026-03-24 16:30:46 -07:00
parent ec2fd3ac06
commit 7cd39319f6
5 changed files with 17 additions and 17 deletions

View File

@ -92,7 +92,7 @@ function curlHelper($url, $APIKey){
// Password Generator API Function
function getStandardPasswordFromAPI($passType){
$apiUrl = "http://0.0.0.0:8189/get_password";
$apiUrl = "http://localhost:8189/get_password";
// Build the query string and full URL
$query = http_build_query(['pwd_index' => $passType]);
$url = rtrim($apiUrl, '?') . '?' . $query;
@ -101,7 +101,7 @@ function getStandardPasswordFromAPI($passType){
// Password Generator API Function for Custom Password
function getCustomPasswordFromAPI($passType, $payload){
$url = 'http://0.0.0.0:8189/custom_password';
$url = 'http://localhost:8189/custom_password';
// Initialise a cURL handle
$ch = curl_init($url);
@ -119,7 +119,7 @@ function getCustomPasswordFromAPI($passType, $payload){
// We want the response body back, not the HTTP headers
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Optional: if you need to trust selfsigned certs (rare for production)
// Optional: if you need to trust self-signed certs (rare for production)
// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
@ -139,7 +139,7 @@ function getCustomPasswordFromAPI($passType, $payload){
curl_close($ch);
if ($httpCode !== 200) {
// Non200 responses are treated as errors
// Non-200 responses are treated as errors
error_log("Password API returned HTTP {$httpCode}");
return false;
}
@ -159,7 +159,7 @@ function getCustomPasswordFromAPI($passType, $payload){
// Password Count API Function
function getPasswordCountFromAPI(){
$apiUrl = "http://0.0.0.0:8189/get_count";
$apiUrl = "http://localhost:8189/get_count";
// Build the query string and full URL
$url = rtrim($apiUrl, '?') ;
return curlHelper($url, "total_passwords");

View File

@ -23,7 +23,7 @@
}
/* ------------------------------------------------------------------
Meter - darkmode look
Meter - dark-mode look
------------------------------------------------------------------ */
#meter {
display: flex;
@ -31,16 +31,16 @@
padding: 8px; /* doubled padding inside container */
align-items: center;
/* Cardstyle background + border - same as before */
/* Card-style background + border - same as before */
background: var(--bg-card);
border: 1px solid var(--clr-border);
border-radius: 4px;
max-width: 420px; /* doubled maxwidth */
max-width: 420px; /* doubled max-width */
box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
/* ------------------------------------------------------------------
Bar - lightdark contrast
Bar - light-dark contrast
------------------------------------------------------------------ */
#meter div {
width: 36px; /* doubled width */