Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

NO_PROXY env var not working #1062

@24berickson

Description

@24berickson

Bug description

NO_PROXY environment variable is not respected by Prisma Client Python when connecting to query engine. Even with NO_PROXY set correctly for localhost/127.0.0.1, connections are still being routed through proxy, resulting in 403 Access Denied errors.

How to reproduce

  1. Set up Prisma Client Python in an environment behind a corporate proxy
  2. Set NO_PROXY environment variable:
os.environ["NO_PROXY"] = "localhost,127.0.0.1"
  1. Try to connect to Prisma query engine:
async with Prisma(http={"trust_env": True}) as prisma_client:
    # Any query attempt results in proxy intercepting local connection
  1. Error received 403 when trying to access http://localhost:60367/status as it was being routed to proxy.

Expected behavior

  1. Prisma Client Python should respect NO_PROXY environment variable
  2. Local connections to query engine should bypass proxy when NO_PROXY is set correctly
  3. Similar behavior to other Prisma clients regarding proxy handling (Node.js working as expected I believe)

Environment & setup

  • OS: Mac OS
  • Database: PostgreSQL
  • Python version: 3.11
  • Prisma version: 0.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions