Skip to content

Commit 2c6b729

Browse files
committed
fix(torrserver): trying to fix torrserver attempt 2 (disable cors)
1 parent 7ff7d43 commit 2c6b729

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/server/misc/torrserver/default.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ in {
9696

9797
services.nginx.virtualHosts."ts.${domain}" = mkIf (webIsSupported && cfg.exposeWeb) {
9898
locations = {
99-
"/".proxyPass = "http://127.0.0.1:${toString cfg.port}";
99+
"/" = {
100+
proxyPass = "http://127.0.0.1:${toString cfg.port}";
101+
102+
# No CORS
103+
extraConfig = ''
104+
add_header 'Access-Control-Allow-Origin' '*';
105+
'';
106+
};
100107
};
101108

102109
enableACME = true;

0 commit comments

Comments
 (0)