|
18 | 18 |
|
19 | 19 | TEMPORAL_CLIENT_CLOUD_API_VERSION = "2024-05-13-00" |
20 | 20 |
|
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 | +) |
24 | 24 |
|
25 | 25 |
|
26 | 26 | def build_codec_server() -> web.Application: |
@@ -76,8 +76,8 @@ async def decryption_authorized(email: str, namespace: str) -> bool: |
76 | 76 |
|
77 | 77 | def make_handler(fn: str): |
78 | 78 | 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 "" |
81 | 81 | _bearer, encoded = auth_header.split(" ") |
82 | 82 |
|
83 | 83 | # Extract the kid from the Auth header |
@@ -156,7 +156,7 @@ async def handler(req: web.Request): |
156 | 156 | ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) |
157 | 157 | ssl_context.check_hostname = False |
158 | 158 | 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 "" |
160 | 160 | ) |
161 | 161 |
|
162 | 162 | web.run_app( |
|
0 commit comments