Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHOT-4398: Fix proxy server handling #208

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


import os
import requests
import sys
import pprint

Expand Down Expand Up @@ -914,9 +915,22 @@ def __setup_sio(self, hostname, port, namespace):
:rtype: bool
"""

# Set up kwargs to pass to socketio Client
client_kwargs = {}
if os.environ.get("SGTK_ENFORCE_PROXY_LOCALHOST", "0").strip().lower() not in [
"1",
"true",
"y",
"yes",
]:
# Set up a session object to disable proxy
session = requests.Session()
session.trust_env = False
client_kwargs["http_session"] = session

# Create and connect to the server to communicate with Alias
self.__sio = self._tk_alias.ShotGridAliasSocketIoClient(
self, namespace, timeout=60 * 3
self, namespace, timeout=60 * 3, **client_kwargs
)

if not self.__sio:
Expand Down