From 493286b7a4cab4616d9936fbed8586aacd152c71 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 17 Oct 2024 10:33:33 +0200 Subject: t14: 85 current 2024-10-17 10:33:20 24.05.20241004.6e6b3dd 6.6.54 * --- modules/obsidian-livesync.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/obsidian-livesync.nix b/modules/obsidian-livesync.nix index 7bbde9d..075c40a 100644 --- a/modules/obsidian-livesync.nix +++ b/modules/obsidian-livesync.nix @@ -42,10 +42,15 @@ in locations."/" = { proxyPass = "http://127.0.0.1:${toString couchdb-port}"; extraConfig = '' - proxy_set_header Host "$host"; - proxy_set_header X-Real-IP "$remote_addr"; - proxy_set_header X-Forwarded-For "$proxy_add_x_forwarded_for"; - proxy_set_header X-Forwarded-Proto "$scheme"; + proxy_set_header Host "$host"; + proxy_set_header X-Real-IP "$remote_addr"; + proxy_set_header X-Forwarded-For "$proxy_add_x_forwarded_for"; + proxy_set_header X-Forwarded-Proto "$scheme"; + add_header Access-Control-Allow-Origin "app://obsidian.md"; + add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; + add_header Access-Control-Allow-Headers "Content-Type, Authorization"; + add_header Access-Control-Allow-Credentials "true"; + add_header Access-Control-Max-Age 86400 ''; }; }; -- cgit 1.4.1