Skip to content

Commit 94bd213

Browse files
committed
formatter
1 parent 524e430 commit 94bd213

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

encryption_jwt/codec_server.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
TEMPORAL_CLIENT_CLOUD_API_VERSION = "2024-05-13-00"
2020

21-
temporal_ops_address = "saas-api.tmprl.cloud:443"
22-
if os.environ.get("TEMPORAL_OPS_ADDRESS"):
23-
temporal_ops_address = os.environ.get("TEMPORAL_OPS_ADDRESS")
21+
temporal_ops_address = (
22+
os.environ.get("TEMPORAL_OPS_ADDRESS") or "saas-api.tmprl.cloud:443"
23+
)
2424

2525

2626
def build_codec_server() -> web.Application:
@@ -76,8 +76,8 @@ async def decryption_authorized(email: str, namespace: str) -> bool:
7676

7777
def make_handler(fn: str):
7878
async def handler(req: web.Request):
79-
namespace = req.headers.get("x-namespace")
80-
auth_header = req.headers.get("Authorization")
79+
namespace = req.headers.get("x-namespace") or "default"
80+
auth_header = req.headers.get("Authorization") or ""
8181
_bearer, encoded = auth_header.split(" ")
8282

8383
# Extract the kid from the Auth header
@@ -156,7 +156,7 @@ async def handler(req: web.Request):
156156
ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
157157
ssl_context.check_hostname = False
158158
ssl_context.load_cert_chain(
159-
os.environ.get("SSL_PEM"), os.environ.get("SSL_KEY")
159+
os.environ.get("SSL_PEM") or "", os.environ.get("SSL_KEY") or ""
160160
)
161161

162162
web.run_app(

0 commit comments

Comments
 (0)