Skip to content

Commit cb93ba1

Browse files
committed
fix(NC32): pass unix-socket and not host:port to Visionatrix
Signed-off-by: bigcat88 <[email protected]>
1 parent c39e0e7 commit cb93ba1

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

ex_app/lib/main.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,17 @@ def background_tasks_polling():
272272

273273
basic_auth = httpx.BasicAuth(SUPERUSER_NAME, SUPERUSER_PASSWORD)
274274
nc = NextcloudApp()
275+
headers = {
276+
"aa-version": "4.0.0",
277+
"ex-app-version": os.environ["APP_VERSION"],
278+
"ex-app-id": os.environ["APP_ID"],
279+
"authorization-app-api": b64encode(f":{os.environ['APP_SECRET']}".encode()).decode(),
280+
}
281+
if HARP_ENABLED:
282+
headers["x-transport-uds"] = "/tmp/exapp.sock" # noqa
275283
ip_address = "127.0.0.1" if os.environ["APP_HOST"] == "0.0.0.0" else os.environ["APP_HOST"] # noqa
276284
webhook_url = f"http://{ip_address}:{os.environ['APP_PORT']}/webhooks" # noqa
277-
webhook_headers = json.dumps(
278-
{
279-
"AA-VERSION": "4.0.0",
280-
"EX-APP-VERSION": os.environ["APP_VERSION"],
281-
"EX-APP-ID": os.environ["APP_ID"],
282-
"AUTHORIZATION-APP-API": b64encode(f":{os.environ['APP_SECRET']}".encode()).decode(),
283-
}
284-
)
285+
webhook_headers = json.dumps(headers)
285286
while True:
286287
while ENABLED_FLAG:
287288
try:

ex_app_scripts/entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if [ -n "$HP_SHARED_KEY" ]; then
1010
cat <<EOF > /frpc.toml
1111
serverAddr = "$HP_FRP_ADDRESS"
1212
serverPort = $HP_FRP_PORT
13+
loginFailExit = false
1314
1415
transport.tls.enable = true
1516
transport.tls.certFile = "/certs/frp/client.crt"
@@ -32,6 +33,7 @@ EOF
3233
cat <<EOF > /frpc.toml
3334
serverAddr = "$HP_FRP_ADDRESS"
3435
serverPort = $HP_FRP_PORT
36+
loginFailExit = false
3537
3638
transport.tls.enable = false
3739

0 commit comments

Comments
 (0)