mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-27 07:39:20 -05:00
refac
This commit is contained in:
1 parent
fcf7208352
commit
de3317e26b
220 files changed
+17200
-22836
No files matched your search
@@ -34,12 +34,12 @@ def setup(app: FastAPI, db_engine: Engine):
|
||||
# Add basic auth header only if both username and password are not empty
|
||||
headers = []
|
||||
if OTEL_BASIC_AUTH_USERNAME and OTEL_BASIC_AUTH_PASSWORD:
|
||||
auth_string = f"{OTEL_BASIC_AUTH_USERNAME}:{OTEL_BASIC_AUTH_PASSWORD}"
|
||||
auth_string = f'{OTEL_BASIC_AUTH_USERNAME}:{OTEL_BASIC_AUTH_PASSWORD}'
|
||||
auth_header = b64encode(auth_string.encode()).decode()
|
||||
headers = [("authorization", f"Basic {auth_header}")]
|
||||
headers = [('authorization', f'Basic {auth_header}')]
|
||||
|
||||
# otlp export
|
||||
if OTEL_OTLP_SPAN_EXPORTER == "http":
|
||||
if OTEL_OTLP_SPAN_EXPORTER == 'http':
|
||||
exporter = HttpOTLPSpanExporter(
|
||||
endpoint=OTEL_EXPORTER_OTLP_ENDPOINT,
|
||||
headers=headers,
|
||||
|
||||
Reference in new issue
Block a user