
seb4ez/jevguard on GitHub
- Stars
- 0
- Forks
- 1
- Language
- Python
- License
- MIT
- Last push
- 22 Sep 2026
Read from GitHub on . Counts change daily.
How it uses Jev
DEFAULT_ENDPOINT = "https://api.typesafe.ai/v1/systemone"
DEFAULT_MODEL = "jev-latest"
class NoRedirectHandler(urllib.request.HTTPRedirectHandler):
"""Refuses to follow HTTP redirects to prevent authorization header leakage."""
def redirect_request(self, req, fp, code, msg, headers, newurl):
raise urllib.error.HTTPError(
newurl, code, f"HTTP redirect ({code}) to '{newurl}' blocked for security.", headers, fp
)
def is_authorized_endpoint(endpoint: str) -> bool:
"""Strictly validates that endpoint targets an authorized TypeSafe AI hostname without userinfo or spoofing."""

