update
This commit is contained in:
22
AzA march 2026 - Kopie (28)/hetzner_wc_probe_only_status.py
Normal file
22
AzA march 2026 - Kopie (28)/hetzner_wc_probe_only_status.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Run inside aza-api container; prints only HTTP status / flags (no secrets)."""
|
||||
import os
|
||||
|
||||
import requests
|
||||
from requests.auth import HTTPBasicAuth
|
||||
|
||||
def main() -> None:
|
||||
base = (os.environ.get("AZA_WOOCOMMERCE_URL") or "").strip().rstrip("/")
|
||||
key = os.environ.get("AZA_WOOCOMMERCE_CONSUMER_KEY")
|
||||
secret = os.environ.get("AZA_WOOCOMMERCE_CONSUMER_SECRET")
|
||||
print("env_url_configured", bool(base))
|
||||
print("env_key_configured", bool(key))
|
||||
print("env_secret_configured", bool(secret))
|
||||
if not (base and key and secret):
|
||||
return
|
||||
url = base + "/wp-json/wc/v3/subscriptions/1448"
|
||||
r = requests.get(url, auth=HTTPBasicAuth(key, secret), timeout=(5, 25))
|
||||
print("wc_sub_probe_http", r.status_code)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user