From 66e6c685d0ea0d475cdbfbb77c9920c52a610c27 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 20 Jul 2023 00:11:58 +0200 Subject: [PATCH] module: Fix missing headers for websockets Should fix error: invalid origin when using websockets Adapted from: https://github.com/frappe/frappe_docker/blob/70c40e2be0a6028be2a164cb12ef74cadd206e43/resources/nginx-template.conf#L49-L50 --- modules/erpnext.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/erpnext.nix b/modules/erpnext.nix index 97befb2..ced0bba 100644 --- a/modules/erpnext.nix +++ b/modules/erpnext.nix @@ -313,7 +313,10 @@ in file_server } handle /socket.io/* { - reverse_proxy :${toString cfg.socketIoPort} + reverse_proxy :${toString cfg.socketIoPort} { + header_up X-Frappe-Site-Name "${cfg.domain}" + header_up Origin "{scheme}://${cfg.domain}" + } } reverse_proxy :${toString cfg.webserver.bindPort}